美文网首页
动态加载StoryBoard

动态加载StoryBoard

作者: 目睹整个事件发生的弓长 | 来源:发表于2017-10-23 14:14 被阅读0次

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

          本文链接:https://www.haomeiwen.com/subject/efhauxtx.html