I have implemented a SWRevealViewController
menu having as a rear view a UITableViewController
with few labels on it. What I want to do is to segue from these label to a UISplitViewController
.
When I ctrl click and drag from a label to UISplitViewController, no segue option shows. Here is a screenshot of Main.storyboard
Also there is no way I can embed the UISplitViewController in a UINavigationController, when I go to Editor/Embed in, all options are greyed.
You can in fact do this with a UINavigation controller in combination with a container view and a second view controller.
Add a UINavigationController to your storyboard and ensure it's set as the initial view controller:
VC1
)root view controller
under Relationship Segue from the popup:
Add a UIButton to VC1:
Add a second view controller to the scene (let's rename it VC2
)
Add a Container View to VC2, replacing the initial view (drag it over top of the view so it highlights gray):
If you did it right, it should look like this:
Delete the unnecessary View Controller that Xcode automatically added to the scene and embedded in the container view, then add a Split View Controller to the scene in its place
Last but not least, add a show (prev. push) segue from the button in VC1 to VC2 -- ctrl+drag from the button in VC1 to the VC2 controller and select Show: