AppDelegate动态加载StoryBoard

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
    
    self.window.rootViewController=[storyboard instantiateInitialViewController];
    
    [self.window makeKeyAndVisible];
    
    return YES;
}

 

转载于:https://www.cnblogs.com/langji/p/5551876.html

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