如何用代码组织多个Storyboard(故事板)

1. 新建一个Storyboard取名为OtherStoryboard.storyboard

2. 使用下面代码加载

UIStoryboard *newStoryboard = [UIStoryboard storyboardWithName:@"OtherStoryboard" bundle:nil];

3. 使用scene identifier获取view controller

instantiateViewControllerWithIdentifier:

(scene identifier便是你在身份查看器(identity inspector)中设置的Storyboard ID)

转载于:https://www.cnblogs.com/davidgu/p/4938651.html

猜你喜欢

转载自blog.csdn.net/weixin_34217711/article/details/93803037