feat: Enable upside down orientation for iPad

The "upside down" orientation for iPad devices was disabled in
05814add86d765b83c91baa3120ba65569803906b55b159fbd091a95876e40a70d.
However, as an iPad user, not having all orientations is quite
uncomfortable and sometimes annoying. Most apps support all
orientations on iPad nowadays. This commit brings back the upside down
orientation in all places where it was disabled.
pull/864/head
Arshak Aghakaryan 2 years ago
parent 2035d508d9
commit fbdb1ad690

@ -45,6 +45,10 @@ public class DocumentTileViewController: UIViewController, UITableViewDelegate,
// MARK: - UI // MARK: - UI
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask { override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.isIPad {
return .all
}
return .allButUpsideDown return .allButUpsideDown
} }

@ -44,6 +44,10 @@ class MediaGalleryNavigationController: UINavigationController {
// MARK: - Orientation // MARK: - Orientation
public override var supportedInterfaceOrientations: UIInterfaceOrientationMask { public override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.isIPad {
return .all
}
return .allButUpsideDown return .allButUpsideDown
} }

@ -53,6 +53,10 @@ public class MediaTileViewController: UIViewController, UICollectionViewDataSour
// MARK: - UI // MARK: - UI
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask { override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UIDevice.current.isIPad {
return .all
}
return .allButUpsideDown return .allButUpsideDown
} }

@ -192,7 +192,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
if UIDevice.current.isIPad { if UIDevice.current.isIPad {
return .allButUpsideDown return .all
} }
return .portrait return .portrait

@ -147,6 +147,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<true/> <true/>

Loading…
Cancel
Save