标签:
oc:
1 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];//创建window 2 self.window.backgroundColor = [UIColor whiteColor];//设置window背景 3 self.window.rootViewController = [[UIViewController alloc]init];//设置window的根控制器 4 [self.window makeKeyAndVisible];//设置可见
swift:
1 self.window = UIWindow(frame: UIScreen.mainScreen().bounds) 2 self.window?.backgroundColor = UIColor.whiteColor() 3 self.window?.rootViewController = UIViewController() 4 self.window?.makeKeyAndVisible()
Xcode 7 创建 Empty Application 工程
标签:
原文地址:http://www.cnblogs.com/S-I-F/p/5021987.html