From 90a675d4fa4aab5b4886a5f144234e3162914445 Mon Sep 17 00:00:00 2001 From: Yishi Lin Date: Mon, 18 Sep 2017 01:33:19 +0800 Subject: [PATCH] Fix passcode lock problem - Fix the problem when the phone is locked in landscape mode, and unlock in portrait mode. --- pass/AppDelegate.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pass/AppDelegate.swift b/pass/AppDelegate.swift index 23da43a..586e635 100644 --- a/pass/AppDelegate.swift +++ b/pass/AppDelegate.swift @@ -87,11 +87,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - passcodeLockPresenter.present(windowLevel: UIApplication.shared.windows.last?.windowLevel) + } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + passcodeLockPresenter = PasscodeLockPresenter(mainWindow: self.window, configuration: PasscodeLockConfiguration.shared) + passcodeLockPresenter.present(windowLevel: UIApplication.shared.windows.last?.windowLevel) } func applicationDidBecomeActive(_ application: UIApplication) {