Home > Software design >  Making existing UIViewControllers in Storyboard as master & detail
Making existing UIViewControllers in Storyboard as master & detail

Time:05-27

I have two UIViewControllers already designed in XCode Storyboard file. All I need to do is create a UISplitViewController and make one of them master and other detail. I can't find a way to do that in Storyboard.

CodePudding user response:

Yes you can make it

  1. Add UISplitViewController into storyboard. You find master UINavigationController with UITableViewController as RootViewController
  2. Delete the root segue between NavigationController and UITableViewController
  3. Make segue From UINavigationController to your first UIViewController as root View Controller of UINaviagtionController
  4. Then Delete the default detail Controller of UISplitViewController
  5. Make segue from UISplitViewController to your second UIViewController
  6. From RelationShip Segue's select secondary view controller to make second UIViewController as detail view controller
  • Related