如何加载storyboard中的控制器?

来源:互联网 发布:天府广场美食攻略 知乎 编辑:程序博客网 时间:2024/06/08 02:28

         第一步:给这个控制器添加storyboardID     

          第二步: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

                         想添加的控制器 *vc = [storyboard instantiateViewControllerWithIdentifier:@"这里写storyboard的ID"];
0 0
原创粉丝点击