pop = [[UIPopoverController alloc] initWithContentViewController:popoverView];
pop.delegate = self; //optional
CGSize size = CGSizeMake(300, 100); // size of view in popover…V2
pop.popoverContentSize = size;
[pop presentPopoverFromRect:control.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Youtube link: http://www.youtube.com/watch?v=1iykxemuxbk
It works fine in simulator, but crashes when running on iPhone.
I can easily get so many articles to implement on iPad, but on iPhone couldn't find a fruitful one. Plz help
UIPopOverController isn't available for iPhone. ONLY iPad.
UIPopOverController will not work for iPhone it will work on Ipad only
If you want to simulate a popover look-alike (e.g. Facebook app), on the iPhone, you will have to code it from scratch using UIViews and custom graphics.
As others said, the popover API is iPad-only.
A popover-like open source project that works on iPhone:
here it is
Try using WEPopover framework. Here is the link https://github.com/werner77/WEPopover
If you really want to use popover in iphone then try this library. This is pretty cool. I integrated with my ios app.
Custom popover controller for iphone
Related
I am working for Facebook integration in my iPad app. I am using FBFriendPickerViewController for same. My app is working fine on iOS 6 for landscape as well as portrait mode but when I use iOS 7 then friend picker controller works fine ONLY for portrait. When try to launch it in landscape mode then white view pops up. I could see faint friend picker view in background but very hard to see that. Do anyone have any idea what must be the reason? Code base I have used is as below.
if (!_friendPicker) {
self.friendPicker = [[FBFriendPickerViewController alloc] init];
// _friendPicker.delegate = self;
_friendPicker.title = #"Select a friend";
_friendPicker.allowsMultipleSelection = NO; // Share dialog doesn't allow more than one recipient
}
[_friendPicker clearSelection];
[_friendPicker loadData];
_friendPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[_friendPicker presentModallyFromViewController:self
animated:YES
handler:nil];
Same thing I have observed on facebook sample app "HelloFacebookSample" :)
Try:
Get the newest Facebook SDK, because in the above link a Facebook rep says the issue should be resolved. The modal frame still takes into account the space for the status bar so you'll have to find a way to deal with it (doesn't bother me enough to spend time solving it at this point).
I also removed a [[UINavigationBar appearance] setTitleTextAttributes:]; line from my app delegate, so maybe try removing all nav bar customisation and see what you get.
Good luck.
I am looking for a great tutorial to implement a popoverview on iPhone all I found so far is talking about the ipad or is crashing
You cannot implement the UIPopover in iPhone.
Please refer UIElementGuidelines
For a nice popover tutorial check this site.
For popover in iPhone use the following Open source controls:
FPPopover
ModalView in iPhone
KGModal
MJPopupviewcontroller
UAmodalpanel
RNBlurmodalview
For more check this site
you cannot implement the standard popoverview in iphone. Have to make a custom view that replicate the popoverview.
Check these :
http://www.50pixels.com/blog/labs/open-library-fppopover-ipad-like-popovers-for-iphone/
This May help you great sample code you can find
https://github.com/takashisite/TSPopover
https://github.com/kyoshikawa/ZPopoverController
https://github.com/ddebin/DDPopoverBackgroundView
https://github.com/werner77/WEPopover
hey i am beginner in iphone application development.
i developed simple application in iphone but i also required it in ipad so for that i start coding for ipad but i didn`t get navigation properly in ipad code through
[self presentModalViewController:navController animated:YES];
[self.navigationController presentModalViewController:navController animated:YES];
for that i use addsubView Method but it didnt get its navigation controller from viewdidload method.
and please tell me how much this type of diffrences b\w iphone and ipad applications.....
if thier is any tutorial on ipad appication than tell me..........
Main difference between iPhone and iPad app is UI design, code behind the logic is same if you are using same components, there are some of the UI elements which are only iPad only like splitview, popup view as you start using these your code behind also changes.
you will get many samples on apple developers.
I am a beginner, and I have an iPhone app.
I want to convert iPhone app to iPad app.
I want to increase the size of all control, images and views according to iPad dimensions programmatically as I have no controls in XIB but in fact they are programmatically made.
I don't want to change the dimensions manually at every place because it is too much of a cumbersome work.
Is there any way I can do this in a better way?
The simple answer is NO.
You have to do it manually. There is no automatic system.
That is the correct answer.
if you have an absolutely trivial app - ie, with no images or controls or layouts! - you can of course just change it to an iPad app.
The questioner is asking specifically how to change all the images, layouts, and so on in a normal app. The answer is it must all be done completely manually. There is no automatic system for re-doing design or re-doing images in Photoshop, etc.
Note that similarly if you want to do both portrait and landscape layouts of an app, you or your designers have to of course simply design both layouts. There's no, say, "artificial intelligence" system that automatically does art direction for the app! You simply have to manually design both layouts and manually build in Photoshop all necessary images for each situation. The same applies to iPad v. iPhone.
(Note that sometimes you will have to do four totally different layouts, and sets of graphics .. for the phone/pad and portrait/landscape.)
This is exactly why iPad apps are sometimes labelled "HD" in the app store - they are of course totally different.
In Xcode, click on your project on the "Groups & Files" sidebar. Press command-I. Search for Targeted Device Family and change it from iPhone to iPad. Then it will compile and run on an iPad but the UI might look a bit funky.
What I did after that was open the xib I used for my iPhone app's FlipSide view (the one that looks funky on the iPad) go to File->Create iPad version and save it as FlipSideiPad.
Then when I load the view controller, I used the following if statement to tell my program to load the iPhone interface if the device is an iPhone or to load the iPad interface if the device is an not an iPhone.
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:#"FlipsideView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
}
else
{
FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:#"iPadFlipsideView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
}
I hope that helps.
You need to resize the view manually...there is no such single methods for converting iphone app to ipad
Duplicate:
How can i use picker view in iphone application using cocos2d ?
Is it possible to use pickerview in iphone application using cocos2d ? If possible then can i do that in my application.Where i can get this information.If not then what are the other solution for doing this in pickerview.
I haven't looked into cocos2d at all, but I assume that if you still have access to the UIKit fameworks within your app you should be able to create an instance of UIPickerView.
However, I'm not sure you'll be able to used it the way you're intending without some subclassing or writing your own. The picker view is intended to be used by the user to pick an item from a selection, not to be automatically spun by the app...
Yes you can use UIKit controls in Cocos2DIPhone.
You just need to attach them directly to the application window.
There are examples in the docs and on the cocos2d message board. Riq is excellent with questions/feedback on the message board there as well.
I have used the UIImagePicker controller in my application using the steps below:
// 1 - instantiate your picker (in my case UIImagePicker):
pickerController = [[UIImagePickerController alloc] init];
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerController.delegate = self;
// 2 - add the picker view as a subview of the actual scene
[[Director sharedDirector] openGLView] addSubview:pickerController.view];
It worked for me but the transition is not animated.