I have an application that has following schema:
Login -> Tab Bar ->
- UINavigationController -> Tab1ViewController
- UISplitViewController -> UINavigationController -> MasterViewController/DetailViewController
- UINavigationController -> Tab3ViewController
Then I implement in my DetailViewController
- (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController
but it never get called.
I also have put the splitview delegate in my detail:
@interface DetailViewController : UITableViewController
<UISplitViewControllerDelegate>
Is there anything I’m missing?
You’re missing multiple things.
One, in order to quickly solve your problem, write:
Two, note that it does not matter whether or not you’re conforming to the
<UISplitViewControllerDelegate>protocol. It’s just a hint for the compiler – it does not make the view controller magically know which object is supposed to be its delegate…Three, as a sidenote: this has absolutely nothing to do with Xcode.