发布时间:
来源:CSDN
【资料图】
1.//从storyboard获取控制器
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"test" bundle:nil];
2.//获取storyboard的第一个控制器
UIViewController *vc = [storyboard instantiateInitialViewController];
3.//获取sotryboard这顶id的控制器
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"SecondVC"];
4.//设置窗口的根视图self.window.rootViewController = vc;