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;
}
相關文章
相關標籤/搜索