AppDelegate动态加载StoryBoard

Posted blue-fly

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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;
}

 

以上是关于AppDelegate动态加载StoryBoard的主要内容,如果未能解决你的问题,请参考以下文章