iOS-代码加载storyboard中的ViewController

来源:互联网 发布:淘宝购物延长收货时间 编辑:程序博客网 时间:2024/05/01 11:04

story中得控制器

UIStoryboard *board = [UIStoryboard storyboardWithName: @"MainStoryboard" bundle: nil];childController = [board instantiateViewControllerWithIdentifier: @"DisclosureDetail"];

这两行的意思就是,先指定好是哪一个storyboard,然后在指定的这个storyboard中找出做了identifier标记的controller,再把这个controller实例化一下,赋给即将展现的子视图

加载初始化控制器

[board instantiateInitialViewController]

1 0
原创粉丝点击