Created
August 18, 2017 23:30
-
-
Save ShingoFukuyama/23be9ee6e49234b4356801f3f701e157 to your computer and use it in GitHub Desktop.
iOS project without storyboard. AppDelegate.swift
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
/* | |
1. Delete `main.storyboard` | |
2. Emptify `Main Interface` on the project's general page | |
3. Add below code inside `application:didFinishLaunchingWithOptions` | |
*/ | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
// Override point for customization after application launch. | |
self.window = UIWindow(frame: UIScreen.main.bounds) | |
if let window = self.window { | |
let viewController = ViewController() | |
window.rootViewController = viewController | |
window.backgroundColor = UIColor.white | |
window.makeKeyAndVisible() | |
} | |
return true | |
} | |
. | |
. | |
. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice, but UIScreen.main.bounds seems producing quite smaller window on screen