UIWindow继承自UIView
// 初始化一个窗口,该窗口不带状态栏
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].applicationFrame];
// 初始化一个窗口,该窗口带状态栏
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor redColor];
// 让window显示出来
[self.window makeKeyAndVisible];
// 设置窗口的跟视图控制器的属性为一个自定义的视图控制器
self.window.rootViewController =