iOS someday

2016-07-13 0 条评论 161 次阅读 0 人点赞

最近学习有点紧张:经过一周的学习,了解到如下几点:

self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    self.viewController = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];

其中self.viewControllerxcode7中默认是没有的.需要自己在AppDelegate.h中写出@property (nonatomic,strong) UIViewController *viewController; [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];就是把xib文件加载出来, self.window.rootViewController = self.viewController;然后就赋值,最后 让这个window为可见状态.

TestSmirk

这个人太懒什么东西都没留下

文章评论(0)