Everything,
I ran into a problem with the new UISplitViewcontroller in iOS8 for iPad. I have a UITableView in a storyboard in a detailViewcontroller and, by clicking on a cell, I have to go to another view called "detailinfo". I am currently using a "show" segue.
However, the current indentation just press on the right side. I want it to show full screen mode, but I don’t know how to do it, I tried to use the preferredDisplayMode property for splitViewController, as a result, it just hides the main view, but did not resize the detailView. I do not want to use the present as modal.
The current way I do
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([[segue identifier]isEqualToString:@"showStudentDetail"]){ if(self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassCompact){ UISplitViewController *splitViewController = (UISplitViewController *)self.navigationController.parentViewController; splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModePrimaryHidden; } } }
and in viewDidAppear using
- (void)viewDidAppear:(BOOL)animated { if(self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassCompact){ UISplitViewController *splitViewController = (UISplitViewController *)self.navigationController.parentViewController; splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAutomatic; } }
This will work, but the masterViewController will be "Jump out", which has a very bad visual effect. Hope can get any help, thanks
source share