I have two template Views (one is a single view and the other is a Split View Controller) each individually works fine. So I put a button on the Single View and put a Push Segue on the button to go to the Split View Controller. When I press the button I get a crash saying Push cant be used from outside UI Navigation Contoller.
Ok so I put the single view template into a UI Navigation Controller and it now says: Split View Controllers cannot be pushed to a Navigation Controller.
So ... how do I do this ??
Thanks !
Use a container view in a normal View Controller, covering up the whole viewing area, and that container view has an embed segue to the Split View Controller
Overwrite the UISplitViewController and put this in the viewDidLoad if you need to communicate between them:
YourLeftVC *masterViewController = (YourLeftVC *) [[self.viewControllers objectAtIndex:0] topViewController];
YourRightVC *detailViewController = [self.viewControllers objectAtIndex:1];
masterViewController.delegate = detailViewController;
Instead of presenting splitviewcontroller try to set as rootviewcontroller.
self.view.window.rootViewController = splitViewController;
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