-
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Description
For a while I couldn't figure out why the LTHPasscodeViewController
was showing up inconsistently. I thought my problem was related to #145. Then I changed my storyboard initialization process (in order to immediately show a login screen over my UITabBarViewController
after launch), and now it's working beautifully. I recommend that you add some info to the How To Use section of the README for use with storyboards.
For me, I had to remove the storyboard name from Target > General > Deployment Info > Main Interface.
Then in application(didFinishLaunchingWithOptions:)
window = UIWindow(frame: UIScreen.main.bounds)
if let window = window { //setup rootViewController manually instead of using storyboard so that PasscodeViewController can be shown immediately
window.backgroundColor = UIColor.white
window.rootViewController = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateInitialViewController()
window.makeKeyAndVisible()
}
//setup passcode appearance...
if LTHPasscodeViewController.doesPasscodeExist() && LTHPasscodeViewController.didPasscodeTimerEnd() {
LTHPasscodeViewController.sharedUser().showLockScreen(withAnimation: false, withLogout: false, andLogoutTitle: nil)
}