diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-05-13 12:07:35 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2019-05-13 12:07:35 -0400 |
commit | 7b5666be83b6cad4f905285e5a17dbb0572286a3 (patch) | |
tree | 866f40c198550fe5a9fb089405b8b602b2425b6d /SmartDeviceLink/SDLScreenshotViewController.m | |
parent | cfa1e814d3511be5bb1c03a2784055f51bc53eb2 (diff) | |
parent | 23182590f7544f869aa2591d44a3758055177ff7 (diff) | |
download | sdl_ios-7b5666be83b6cad4f905285e5a17dbb0572286a3.tar.gz |
Merge branch 'develop' of https://github.com/smartdevicelink/sdl_ios into develop6.2.3
Diffstat (limited to 'SmartDeviceLink/SDLScreenshotViewController.m')
-rwxr-xr-x | SmartDeviceLink/SDLScreenshotViewController.m | 14 |
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; } |