[ios] Adaptive fullscreen in landscape by device orientation (#1862)

* update UIInterfaceOrientation in fullscreen

* update code
This commit is contained in:
Tuan Luong 2020-05-15 19:48:15 +07:00 committed by GitHub
parent 0b914ef2b9
commit c9096d16f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
if ([self.preferredOrientation.lowercaseString isEqualToString:@"landscape"]) { if ([self.preferredOrientation.lowercaseString isEqualToString:@"landscape"]) {
return UIInterfaceOrientationLandscapeRight; return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
} }
else if ([self.preferredOrientation.lowercaseString isEqualToString:@"portrait"]) { else if ([self.preferredOrientation.lowercaseString isEqualToString:@"portrait"]) {
return UIInterfaceOrientationPortrait; return UIInterfaceOrientationPortrait;