Force the PasscodeLockVC to be portrait

This commit is contained in:
Yishi Lin 2017-07-07 17:36:04 +08:00
parent 3593974ca4
commit 4b5ea10b40

View file

@ -38,6 +38,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
if let _ = window?.rootViewController as? PasscodeLockViewController {
// Force the PasscodeLockVC to be portrait because the rotation seems bugy in some cases
return .portrait
} else {
return .all
}
}
func postSearchNotification() {
NotificationCenter.default.post(name: .passwordSearch, object: nil)
}