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.
This commit is contained in:
Arshak Aghakaryan 2023-07-10 07:17:24 +04:00
parent 2035d508d9
commit fbdb1ad690
5 changed files with 14 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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

View File

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