Force orientation to portrait on phones

This commit is contained in:
ismailgulek
2020-08-06 16:54:58 +03:00
parent bf6aa600eb
commit b249b85c2e
2 changed files with 44 additions and 1 deletions
@@ -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