Landscape orientation.

This commit is contained in:
Matthew Chen 2019-01-09 10:03:28 -05:00
parent a0bf2717ac
commit 7654d05417
3 changed files with 19 additions and 5 deletions

View File

@ -946,6 +946,11 @@ static NSTimeInterval launchStartedAt;
- (UIInterfaceOrientationMask)application:(UIApplication *)application
supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window
{
if (self.windowManager.hasCall) {
// The call-banner window is only suitable for portrait display
return UIInterfaceOrientationMaskPortrait;
}
if (!window) {
// If `window` is nil, be permissive. Otherwise orientation
// gets messed up during presentation of windows.
@ -960,11 +965,6 @@ static NSTimeInterval launchStartedAt;
return UIInterfaceOrientationMaskPortrait;
}
if (self.windowManager.hasCall) {
// The call-banner window is only suitable for portrait display
return UIInterfaceOrientationMaskPortrait;
}
return UIInterfaceOrientationMaskAllButUpsideDown;
}

View File

@ -540,6 +540,13 @@ typedef void (^CustomLayoutBlock)(void);
[self updateVerificationStateLabel];
}
#pragma mark - Orientation
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
@end
NS_ASSUME_NONNULL_END

View File

@ -246,6 +246,13 @@ NS_ASSUME_NONNULL_BEGIN
[super dismissViewControllerAnimated:animated completion:completion];
}
#pragma mark - Orientation
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
@end
NS_ASSUME_NONNULL_END