Disable landscape mode

pull/134/head
Niels Andriesse 5 years ago
parent d039ecd87e
commit 60ae83c9dc

@ -205,21 +205,14 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Orientation #pragma mark - Orientation
- (BOOL)shouldAutorotate
{
return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations - (UIInterfaceOrientationMask)supportedInterfaceOrientations
{ {
if (self.visibleViewController) { return UIInterfaceOrientationMaskPortrait;
if (@available(iOS 10, *)) {
// do nothing
} else {
// Avoid crash in SAE on iOS9
if (!CurrentAppContext().isMainApp) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
}
return self.visibleViewController.supportedInterfaceOrientations;
} else {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
} }
@end @end

Loading…
Cancel
Save