Skip to content

Instantly share code, notes, and snippets.

@danstepanov
Last active April 28, 2017 20:35
Show Gist options
  • Save danstepanov/8838aa06728046a9ca58 to your computer and use it in GitHub Desktop.
Save danstepanov/8838aa06728046a9ca58 to your computer and use it in GitHub Desktop.
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Initialize the window
window = UIWindow.init(frame: UIScreen.mainScreen().bounds)
// Set Background Color of window
window?.backgroundColor = UIColor.whiteColor()
// Allocate memory for an instance of the 'MainViewController' class
let mainViewController = MainViewController()
// Set the root view controller of the app's window
window!.rootViewController = mainViewController
// Make the window visible
window!.makeKeyAndVisible()
return true
}
@aschmitt
Copy link

Hi,

if you like to update the nice tutorial to Swift 3:
Line 4: window = UIWindow.init(frame: UIScreen.main.bounds)
Line 7: window?.backgroundColor = UIColor.white

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment