I have nice helper functions that allow me to show/hide the master popover view controller. However, I can not for the life of me figure out how to hide it on initialization, so that it is hidden when the app first starts.
I've tried a couple of things (such as trying to dismiss is from the viewLoaded or viewDidAppear) but these throw strange errors (e.g. too made slider counts...etc).
Now I'm starting to believe there must be a simpler, and the right way, to do this.
Are you trying to hide the splitviewController Master Popover? Which orientation would make this question more specific. I will assume you are in fact trying to hide the SplitView MasterPopover in landscape (since it should already be hidden in portrait).
Do this:
Your detailViewController
should have UISplitViewControllerDelegate
. And simply just drop this code in:
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation{
return YES;
}
This will make popoverView hidden when the app starts up. Let me know, if it works for you.