Force orientation to portrait on phones

This commit is contained in:
ismailgulek
2020-08-06 16:54:58 +03:00
parent 2116c81a81
commit f6acdcf507
2 changed files with 44 additions and 1 deletions

View File

@@ -28,4 +28,31 @@
return self.topViewController;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if (self.topViewController)
{
return self.topViewController.supportedInterfaceOrientations;
}
return [super supportedInterfaceOrientations];
}
- (BOOL)shouldAutorotate
{
if (self.topViewController)
{
return self.topViewController.shouldAutorotate;
}
return [super shouldAutorotate];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
if (self.topViewController)
{
return self.topViewController.preferredInterfaceOrientationForPresentation;
}
return [super preferredInterfaceOrientationForPresentation];
}
@end