I have a splitvew controller (set in storyboard) with master and detail, and I set the preferredDisplayMode as UISplitViewControllerDisplayModeAllVisible in the master viewController.
I have these method on the master view controller:
- (void) viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
//This is called
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
//This is not called
[self.searchController.searchBar sizeToFit];
[self configNavBar]; //Adds few buttons to the nav bar
}
I'm wondering why the viewwillAppear isn't called here but viewDidLoad, viewDidAppear are called. The breakpoint in the viewWillAppear didn't hit .
If I set the preferred display mode as UISplitViewControllerDisplayModePrimaryOverlay, then viewWillAppear is getting called.
But here the detail view controller doesn't occupy the half screen.