Created
February 23, 2017 01:42
-
-
Save gamako/485a68bfd644d0dcd26688781086696b to your computer and use it in GitHub Desktop.
Template of UIApplicationDelegate without storyboard.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
let vc = ViewController() | |
let nav = UINavigationController(rootViewController: vc) | |
let window = { () -> UIWindow in | |
let window = UIWindow(frame: UIScreen.main.bounds) | |
window.rootViewController = nav | |
return window | |
}() | |
window.makeKeyAndVisible() | |
self.window = window | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment