Create the boilerplate codes from the pre-existed sample code. The default template code is started with a storyboard, then the next step was to delete the storyboard.
Create the window property in AppDelegate’s init function application didFinishLaunchingWithOptions, and set the window’s rootViewController property.
self.window = UIWindow()
self.window!.rootViewController = UIViewController()
self.window!.backgroundColor = UIColor.redColor()
self.window!.makeKeyAndVisible()
return ture