一.创建文件



二.手动实例化window
修改 AppDelegate 中的 didFinishLaunchingWithOptions 函数,设置启动控制器
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.backgroundColor = UIColor.whiteColor()
window?.makeKeyAndVisible()
//设置根视图控制器
window?.rootViewController = MainViewController()
return true
}
原文:http://www.cnblogs.com/torrescx/p/5237087.html