Segue between two view controllers

£可爱£侵袭症+ 提交于 2019-12-03 23:49:41

You actually have to set your UIViewController as the root controller of a UINavigationController (or pushed through from a view controller w/ a navcontroller). To do that

  • Drag a new navigation controller into your storyboard - it will by default be attached to a tableview controller
  • Delete the tableview controller Right click on the navgiation controller, and connect the "Root View Controller" property to your existing view controller
  • Move the entry point arrow from your view controller to the root view controller

Simplest way to do this is to select the View controller you want to be the root of your navigation hierarchy and choose

Editor > Embed In > Navigation Controller

This creates the new navigation controller and hooks up everything up for you.

check this steps: 1. to click connection between two view controller. 2. click attribute inspector 3. set identifier to "showDetail". 4. save and run.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!