Merge branch 'dev' into disappearing-message-redesign

pull/941/head
ryanzhao 11 months ago
commit 2b2d67a444

@ -46,6 +46,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
} }

@ -54,6 +54,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
} }

@ -248,7 +248,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

@ -144,6 +144,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/>

@ -13,12 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
BOOL IsLandscapeOrientationEnabled(void) BOOL IsLandscapeOrientationEnabled(void)
{ {
return NO; return UIDevice.currentDevice.isIPad;
} }
UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void) UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void)
{ {
return (IsLandscapeOrientationEnabled() ? UIInterfaceOrientationMaskAllButUpsideDown return (IsLandscapeOrientationEnabled() ? UIInterfaceOrientationMaskAll
: UIInterfaceOrientationMaskPortrait); : UIInterfaceOrientationMaskPortrait);
} }

Loading…
Cancel
Save