How can I fix the “UIPopoverController is deprecated” warning?

You no longer need UIPopoverController for presenting a view controller. Instead you can set the modalPresentationStyle of view controller to UIModalPresentationPopover. You can use the following code for that: avc.modalPresentationStyle = UIModalPresentationPopover; avc.popoverPresentationController.sourceView = theButton; [self presentViewController:avc animated:YES completion:nil]; UIModalPresentationPopover In a horizontally regular environment, a presentation style where the content is displayed in a … Read more

change color navigation controller in a popover

//////////////////////////////////////// ////////////**SOLUTION**//////// //////////////////////////////////////// I’m gonna edit this post because i solved my problem and I think could be helpful share my solution here: first of all, follow this sample: http://mobiforge.com/designing/story/using-popoverview-ipad-app-development When It is done go to step two. The second step will be add a new popoverBackgroundViewClass: Add new file in your project Objective class … Read more

UISplitViewController in a TabBar ( UITabBarController )?

Using the interface builder, create a split view controller and a tab bar controller and link them to your outlets: @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; @property (nonatomic, retain) IBOutlet UISplitViewController *splitViewController; In your app delegate didFinishLaunchingWithOption, assign your split view controller to the tab bar controller: splitViewController.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@”Title” image:nil tag:0] autorelease]; … Read more

Popovers cannot be presented from a view which does not have a window

the thing that saved my life: if (self.view.window != nil) [popoverController presentPopoverFromRect:CGRectMake(44, yCoord, 111, 111) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; by adding if condition it doesn´t crash anymore. I don´t really get it because the presentPopoverFromRect function is ALWAYS called. There is no situation where window would be nil but anyway it did the trick. edit: I … Read more

UIDatePicker in UIPopover

Try with below code. It will work fine: Objective-C – (IBAction)showDatePicker:(UIButton *)sender { UIDatePicker *datePicker = [[UIDatePicker alloc]init];//Date picker datePicker.frame = CGRectMake(0, 0, 320, 216); datePicker.datePickerMode = UIDatePickerModeDateAndTime; [datePicker setMinuteInterval:5]; [datePicker addTarget:self action:@selector(dateChanged:) forControlEvents:UIControlEventValueChanged];//need to implement this method in same class UIView *popoverView = [[UIView alloc] init]; //view popoverView.backgroundColor = [UIColor clearColor]; [popoverView addSubview:datePicker]; // … Read more

How to customize / style a UIPopoverController

This is possible starting in iOS 5.0 by subclassing the abstract class UIPopoverBackgroundView and assigning your subclass to the popoverBackgroundViewClass property on your UIPopoverController instance. Unfortunately there is no tintColor property as the popover needs to use images for it’s arrow and border in order to achieve smooth animations during dynamic resizing. You can learn … Read more

UIPopoverController for iphone not working?

You CAN use popoverController in iPhone apps. 1. Create a category // UIPopoverController+iPhone.h file @interface UIPopoverController (iPhone) + (BOOL)_popoversDisabled; @end // UIPopoverController+iPhone.m file @implementation UIPopoverController (iPhone) + (BOOL)_popoversDisabled { return NO; } @end 2. Import it to your class and use popover in iPhone as usual. But remember that this is private method and Apple … Read more