Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the app’s top most controller’s rotation preferences due to an ap…
…ple bug Fixes #1250
- Loading branch information
1 parent
f9dd27e
commit a691a2b
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// UIWindow+SDLExtensions.h | ||
// SmartDeviceLink | ||
// | ||
// Created by Joel Fischer on 5/2/19. | ||
// Copyright © 2019 smartdevicelink. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface UIWindow (SDLExtensions) | ||
|
||
@property (strong, nonatomic) UIViewController *sdl_topMostController; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// UIWindow+SDLExtensions.m | ||
// SmartDeviceLink | ||
// | ||
// Created by Joel Fischer on 5/2/19. | ||
// Copyright © 2019 smartdevicelink. All rights reserved. | ||
// | ||
|
||
#import "UIWindow+SDLExtensions.h" | ||
|
||
@implementation UIWindow (SDLExtensions) | ||
|
||
- (UIViewController *)sdl_topMostController { | ||
UIViewController *topController = self.rootViewController; | ||
|
||
while (topController.presentedViewController) { | ||
topController = topController.presentedViewController; | ||
} | ||
|
||
return topController; | ||
} | ||
|
||
@end |