创建window
2021-05-12 16:29
标签:控制器 and 视图控制器 class 视图 ble option main elf 创建window 标签:控制器 and 视图控制器 class 视图 ble option main elf 原文地址:http://www.cnblogs.com/vector11248/p/7571502.html 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 }