summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-04-09 18:07:30 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-05-05 10:56:34 +0200
commitac436238e13dc331ec108232fd3ca75759a78a09 (patch)
tree07048cbfc16e739d8fedbd6a0bb398c2e45efa6d /ios
parentc5d47160e1d03cef3f59197b8264eb393711d3f4 (diff)
downloadmullvadvpn-ac436238e13dc331ec108232fd3ca75759a78a09.tar.xz
mullvadvpn-ac436238e13dc331ec108232fd3ca75759a78a09.zip
AppDelegate: use UIDevice.current.userInterfaceIdiom
Diffstat (limited to 'ios')
-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
}
}
}