多个storyboard关联

多个storyboard关联
1,拖一个storyboard reference

2,如果不设置referenced id, 默认关联目标storyboard,is initial viewcontroller的控制器

3,设置了referenced id,就关联了对应的控制器

4,如果目标storyboard没有设置is initial viewcontroller, referenced id也不填写,则会报错
(null): xxx.storyboard references the initial view controller of xxx.storyboard, but no designated entry point was found.

5,refactor to storyboard 用来拆分storyboard,自动拆分的关联控制器, 自动获得referenced id 和storyboard id, 如果代码中用到instantiateViewControllerWithIdentifier的地方,不需要改代码。

6, 如果报错“Deploying Storyboard References to iOS 8.0 requires that your storyboards do not share any view controller identifiers.”,
则需要修改关联的控制器的storyboard id,清空就可以了。

这样不能使用instantiateViewControllerWithIdentifier方法
在当前storyboard中取对应storyboard id的控制器, 但是保留实际的控制器所在的storyboard中的storyboard的 storyboard id设置就行,使用原来的实际的storybarod用取控制器。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,323评论 19 139
  • 原帖地址 Storyboard是在iOS5之后新增的一个令人兴奋的功能,使用Storyboard可以节省很多的时间...
    hrscy阅读 22,184评论 2 45
  • iOS 实战开发课程笔记 本贴旨在作为对极客班 《iOS 开发实战》第五期期课程视频重新学习的笔记。目标是建立一个...
    黄穆斌阅读 8,235评论 12 57
  • *面试心声:其实这些题本人都没怎么背,但是在上海 两周半 面了大约10家 收到差不多3个offer,总结起来就是把...
    Dove_iOS阅读 27,312评论 30 472
  • 正方形代表判断模块(decision block) ,椭圆代表终止模块(terminating block),表示...
    凌岸_ing阅读 6,965评论 0 1