Add feature flag for landscape orientation.
This commit is contained in:
parent
cef28eb103
commit
eab3599ce9
|
@ -148,8 +148,6 @@
|
|||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
|
|
|
@ -93,7 +93,7 @@ class MenuActionsViewController: UIViewController, MenuActionSheetDelegate {
|
|||
// MARK: Orientation
|
||||
|
||||
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
return .allButUpsideDown
|
||||
return DefaultUIInterfaceOrientationMask()
|
||||
}
|
||||
|
||||
// MARK: Present / Dismiss animations
|
||||
|
|
|
@ -9,6 +9,6 @@ import Foundation
|
|||
// MARK: Orientation
|
||||
|
||||
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
return .allButUpsideDown
|
||||
return DefaultUIInterfaceOrientationMask()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -624,7 +624,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
{
|
||||
return (self.profileViewMode == ProfileViewMode_Registration ? UIInterfaceOrientationMaskPortrait
|
||||
: UIInterfaceOrientationMaskAllButUpsideDown);
|
||||
: DefaultUIInterfaceOrientationMask());
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -170,6 +170,6 @@ public class BackupRestoreViewController: OWSTableViewController {
|
|||
// MARK: Orientation
|
||||
|
||||
public override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
return .allButUpsideDown
|
||||
return DefaultUIInterfaceOrientationMask()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
[super loadView];
|
||||
|
||||
self.shouldUseTheme = NO;
|
||||
self.interfaceOrientationMask = UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
self.interfaceOrientationMask = DefaultUIInterfaceOrientationMask();
|
||||
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
self.title = NSLocalizedString(@"COUNTRYCODE_SELECT_TITLE", @"");
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#define LANDSCAPE_ORIENTATION_ENABLED
|
||||
|
||||
UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void);
|
||||
|
||||
@interface OWSViewController : UIViewController
|
||||
|
||||
@property (nonatomic) BOOL shouldIgnoreKeyboardChanges;
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void)
|
||||
{
|
||||
#ifdef LANDSCAPE_ORIENTATION_ENABLED
|
||||
return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
#else
|
||||
return UIInterfaceOrientationMaskPortrait;
|
||||
#endif
|
||||
}
|
||||
|
||||
@interface OWSViewController ()
|
||||
|
||||
@property (nonatomic, weak) UIView *bottomLayoutView;
|
||||
|
@ -185,7 +194,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
{
|
||||
return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
return DefaultUIInterfaceOrientationMask();
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue