动态加载StoryBoard

2017-10-23  本文已影响0人  目睹整个事件发生的弓长

动态加载StoryBoard的代码如下:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"First" bundle:[NSBundle mainBundle]];

self.window.rootViewController = [storyBoard instantiateInitialViewController];

self.window.backgroundColor = [UIColor whiteColor];

[self.window makeKeyAndVisible];
上一篇下一篇

猜你喜欢

热点阅读