I'm confused how to handle a split view controller on iPhones other than the 6 Plus which handles the split view controller like iPad. I want the detail view controller to be the root view controller that appears on those iPhones.
Edit
I was able to get the behavior I wanted by adding these two delegate methods. Now the split view controller collapses to the detail view controller instead of the master view controller on iPhone.
- (UIViewController *)primaryViewControllerForCollapsingSplitViewController:(UISplitViewController *)splitViewController
{
return self.detailNavigationController;
}
- (BOOL)splitViewController:(UISplitViewController *)splitViewController collapseSecondaryViewController:(UIViewController *)secondaryViewController ontoPrimaryViewController:(UIViewController *)primaryViewController
{
return YES;
}
Problem 1
I'm getting this message now in the console when I push my master view controller onto the detail view controller's navigation controller on iPhone. It works fine so I don't understand why I'm getting this message.
Unbalanced calls to begin/end appearance transitions for <MasterTableViewController: 0x7fc8d2b67220>.
Problem 2
I'm not clear on the preferred way to detect when the split view controller collapses on iPhone. I'm using the UIViewControllerShowDetailTargetDidChangeNotification
notification to detect this change but I feel like there should be some kind of delegate method for this change.