1 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
2 // Override point for customization after application launch.
3
4 //创建window分为四个步骤
5 //1.创建一个window
6 self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
7 //2.创建一个视图控制器
8 self.window.rootViewController = [[UIViewController alloc]init];
9 //3.创建背景色
10 self.window.backgroundColor = [UIColor orangeColor];
11 //4.可以显示
12 [self.window makeKeyAndVisible];
13 return YES;
14 }