Is there is any way to hide the master view in a splitviewcontroller programmatically. In my application the first screen will be of a splitviewcontroller, i don't need any split view for the next screens. How i can achieve this
in SDK 5.0 they added new method for UISplitViewControllerDelegate that would do this easily for you. Just implement it like next and you would not see the master view:
- (BOOL)splitViewController:(UISplitViewController*)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation { return YES; }
The only place when you can see it is rotation - the part of master view is visible during animation. I've fixed that in simple way, just loaded empty and black view in master.
PS: not sure whether this is actual for i0707. But hope this could be useful for other people that now have the same issues.
Same as answer from Jack but a one liner. Past into - (void)setDetailItem:(id)newDetailItem { ... } to dismiss the master.
[[UIApplication sharedApplication] sendAction: self.navigationItem.leftBarButtonItem.action to: self.navigationItem.leftBarButtonItem.target from: nil forEvent: nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With