summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-05-13 12:07:35 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-05-13 12:07:35 -0400
commit7b5666be83b6cad4f905285e5a17dbb0572286a3 (patch)
tree866f40c198550fe5a9fb089405b8b602b2425b6d
parentcfa1e814d3511be5bb1c03a2784055f51bc53eb2 (diff)
parent23182590f7544f869aa2591d44a3758055177ff7 (diff)
downloadsdl_ios-7b5666be83b6cad4f905285e5a17dbb0572286a3.tar.gz
Merge branch 'develop' of https://github.com/smartdevicelink/sdl_ios into develop6.2.3
-rwxr-xr-xSmartDeviceLink/SDLScreenshotViewController.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/SmartDeviceLink/SDLScreenshotViewController.m b/SmartDeviceLink/SDLScreenshotViewController.m
index 8a817e51d..9ac5f4a8c 100755
--- a/SmartDeviceLink/SDLScreenshotViewController.m
+++ b/SmartDeviceLink/SDLScreenshotViewController.m
@@ -32,12 +32,12 @@
return self;
}
- // HAX: https://github.com/smartdevicelink/sdl_ios/issues/1250
+// HAX: https://github.com/smartdevicelink/sdl_ios/issues/1250
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
UIViewController *viewController = [self sdl_topMostControllerForWindow:[UIApplication sharedApplication].windows[0]];
if (viewController == self) {
- @throw [NSException sdl_invalidLockscreenSetupException];
+ return UIInterfaceOrientationMaskAll;
} else if (viewController != nil) {
return viewController.supportedInterfaceOrientations;
}
@@ -45,21 +45,23 @@
return UIInterfaceOrientationMaskAll;
}
- // HAX: https://github.com/smartdevicelink/sdl_ios/issues/1250
+// HAX: https://github.com/smartdevicelink/sdl_ios/issues/1250
- (BOOL)shouldAutorotate {
UIViewController *viewController = [self sdl_topMostControllerForWindow:[UIApplication sharedApplication].windows[0]];
- if (viewController != nil) {
+ if (viewController == self) {
+ return YES;
+ } else if (viewController != nil) {
return viewController.shouldAutorotate;
}
- return super.shouldAutorotate;
+ return YES;
}
- (UIViewController *)sdl_topMostControllerForWindow:(UIWindow *)window {
UIViewController *topController = window.rootViewController;
- while (topController.presentedViewController) {
+ while (topController.presentedViewController != nil) {
topController = topController.presentedViewController;
}