summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/AppDelegate.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index f36a4c8560..f22e32dd4e 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -144,13 +144,13 @@ extension AppDelegate: RootContainerViewControllerDelegate {
}
func rootContainerViewSupportedInterfaceOrientations(_ controller: RootContainerViewController) -> UIInterfaceOrientationMask {
- switch self.window?.traitCollection.userInterfaceIdiom {
+ switch UIDevice.current.userInterfaceIdiom {
case .pad:
return [.landscape, .portrait]
case .phone:
return [.portrait]
default:
- fatalError("Not supported")
+ return controller.supportedInterfaceOrientations
}
}
}