Jordy Wittouck Jordy Wittouck - 2 years ago 106
Swift Question

SplitviewController in navigationviewcontroller

Hey I am building my first ios application using xcode. I'm a total noob in xcode and swift and I am trying to use the storyboards to set-up my app. Here's a link to the prototype

Basically my issue is where I want to do the split view on the resellers page. I want to use the splitviewcontroller only on the page, so after an intro viewcontroller in a navigation controller. like this
I read somewhere that a splitviewcontroller must be the initial view controller, however this works if I use segues that pop up modally. But when I do that I don't really have a navigation bar anymore on the page. I only have the splitview, but there must be the option to go back.

Am I doing this completely wrong or is there a simple fix to get what I want?

Answer Source

If you want to present your UISplitViewController modally, then you need to wrap into UINavigationController. After it you can add UIBarButtonItem in your UISplitViewController and set an action to dismissViewControllerAnimated(true, completion: nil)

Storyboard implementation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download