快捷键:当你想要建立segue的时候,点击第一个控制器的self, 然后按住 control + 鼠标左键 或者 点了第一个控制器的self,然后鼠标右键拖到想要的控制器上,松开。
对于TabbarController 而已,上一步操作,弹出的框,选择viewControllers
对于普通的控制器,跳转的换,那就选择show 或者 push 或者 present

iOS 9 之后,出现 Storyboard References ,Storyboard References 允许你从 segue 中引用其他 storyboard 中的 viewController。这意味中你可以保持不同功能模块化,同时 Storyboard 的体积变小并易与管理。不仅容易理解了,和团队一起工作时,合并(工作成果)也变的简单了。
操作步骤 :
如何从 storyboard 的 segue 中创建和展示 storyboard reference?
选中 viewController 然后点击 Xcode 的菜单“Editor->Refactor to Storyboard”. 给新的 storyboard 取个名字,并保存。这会创建并打开一个新的 storyboard。


可参考链接 :http://www.cocoachina.com/ios/20150922/13474.html
Masnory 参考:http://www.cocoachina.com/ios/20170109/18538.html
1.创建窗
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
2.加载控制器
从StoryBoard当中加载控制器
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
加载剪头指向的控制器
UIViewController *vc = [storyBoard instantiateInitialViewController];
3.设置窗根控制器
self.window.rootViewController = vc;
4.显窗
[self.window makeKeyAndVisible];

- 加载控制器的两种式
0.加载指定的StoryBoard.
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
1.加载箭头所指向的控制器.
UIViewController *vc = [storyBoard instantiateInitialViewController];
2.加载指定标识的控制器.
UIViewController *vc = [storyBoard instantiateViewControllerWithIdentifier:@"VCStoryBoardID"];

可参考 : http://blog.csdn.net/liuyinghui523/article/details/62036465
网友评论