动态加载StoryBoard

动态加载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];

你可能感兴趣的:(动态加载StoryBoard)