Skip to content

Instantly share code, notes, and snippets.

@ryanmasondavies
Created January 23, 2016 20:30
Show Gist options
  • Save ryanmasondavies/3fc2eef68a01c8196dbd to your computer and use it in GitHub Desktop.
Save ryanmasondavies/3fc2eef68a01c8196dbd to your computer and use it in GitHub Desktop.
App delegate without storyboards
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
lazy var window: UIWindow? = {
let window = UIWindow(frame: UIScreen.mainScreen().bounds)
window.backgroundColor = UIColor.whiteColor()
window.rootViewController = ViewController()
return window
}()
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
window!.makeKeyAndVisible()
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment