Created
June 17, 2020 10:16
-
-
Save Toni77777/6cfaaa34f4241b4be738ee133d2c0de1 to your computer and use it in GitHub Desktop.
Set rootViewController in AppDelegate (Before iOS 13 and Xcode 11)
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
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
// Create a new window property | |
self.window = UIWindow(frame: UIScreen.main.bounds) | |
// Set custom LoginViewController as root | |
self.window?.rootViewController = LoginViewController() | |
// Present the window | |
self.window?.makeKeyAndVisible() | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment