Skip to content

Instantly share code, notes, and snippets.

@psaitu
Created June 13, 2016 09:44
Show Gist options
  • Select an option

  • Save psaitu/5e6091a37223f31d8f9a18cff5402728 to your computer and use it in GitHub Desktop.

Select an option

Save psaitu/5e6091a37223f31d8f9a18cff5402728 to your computer and use it in GitHub Desktop.
Custom App Delegate
import UIKit
@UIApplicationMain class WindowController: UIResponder {
var window: UIWindow? = {
let window = UIWindow(frame: UIScreen.mainScreen().bounds)
window.rootViewController = UINavigationController(rootViewController: ViewController())
return window
}()
}
extension WindowController: UIApplicationDelegate {
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