iOS 从情节提要实例化
示例
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
带有标识符:
在情节提要的身份检查器中为场景提供一个情节提要ID。
实例化代码:
UIViewController *controller = [storyboard instantiateViewControllerWithIdentifier:@"myIdentifier"];
实例化一个初始viewcontroller:
在情节提要中,选择视图控制器,然后选择属性检查器,选中“是初始视图控制器”框。
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UIViewController *controller = [storyboard instantiateInitialViewController];
热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短