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
- (BOOL)shouldAutorotate
{
return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if (self.visibleViewController) {
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;
}
return UIInterfaceOrientationMaskPortrait;
}
@end

Loading…
Cancel
Save