UINavigationController
StoryBoard的Segue类型有三种:Push,Modal,Custom.其中Push类型的Segue需要用到UINavigationController。第一步,先清空之前所有的连线和连接,选择ViewController,打开Editor菜单,选择Embed In选项中的Navigation Controller。
主窗口区域会出现一个UINavigationController实例
按照第一篇的方式,Ctrl连线ViewController上按钮和ViewController2,选择连接的类型为:Push,然后连接ViewController上的返回按钮到ViewController的Exit,关联unWindSegue:方法。Main.storyboard最终是这个样子:
运行效果,在页面2点击橙色的返回按钮和点击左上角Back按钮效果一样。
UITabViewController
选中ViewController,打开Editor菜单,选择Embed In选项中的Tab Bar Controller,然后将UITabBarController的实例设为启动控制器

Ctrl连线UITabBarController实例和页面2,并在弹出的选项中选择:view controllers

最终变成下面这个样子:

运行效果:

同时使用UINavigationController和UITabBarController
将页面1和页面2分别嵌入到一个UINavigationController实例中,如图

运行app:

StoryBoard初探(二):使用UINavigationController和UITabBarController
原文:http://blog.csdn.net/nextstudio/article/details/42120017