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;
}

 

posted @ 2016-06-02 09:24  blue-fly  阅读(703)  评论(0编辑  收藏  举报