Skip to content

Instantly share code, notes, and snippets.

@mitsuse
Created October 25, 2016 06:37
Show Gist options
  • Save mitsuse/d93a985f5a3dc9132d838da5265ab65e to your computer and use it in GitHub Desktop.
Save mitsuse/d93a985f5a3dc9132d838da5265ab65e to your computer and use it in GitHub Desktop.
A minimal implementation of `AppDelegate` for Swift 2.x.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(
application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?
) -> Bool {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.backgroundColor = UIColor.whiteColor()
window?.rootViewController = UIViewController()
window?.makeKeyAndVisible()
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment