Using a split view on the iPad, I have the following code:
- (void) splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController
If you are using the default UISplitViewController
setup, then the navigation bar button that is created displays a popover of your RootViewController
.
If you want to make sure you don't have multiple pop-ups on at once, you can simply dismiss pop-ups whenever your RootViewController
will appear. Here's code I used to solve this problem:
- (void) viewWillAppear:(BOOL)animated {
if ([self.popover isPopOverVisible]) {
[self.popover dismissPopoverAnimated:YES];
}
[super viewWillAppear:YES];
}