Merge pull request #112 from Capgemini-nantes-df/master

get real top most view controller
This commit is contained in:
Eddy Verbruggen 2018-03-15 21:22:09 +01:00 committed by GitHub
commit 206b7e014e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,7 @@ static id styling;
}
- (UIViewController*) getTopMostViewController {
UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController;
UIViewController *presentingViewController = [[UIApplication sharedApplication] keyWindow].rootViewController;
while (presentingViewController.presentedViewController != nil) {
presentingViewController = presentingViewController.presentedViewController;
}