forked from github/Toast-PhoneGap-Plugin
get real top most view controller
This commit is contained in:
parent
4324168d2a
commit
a429424107
@ -157,7 +157,7 @@ static id styling;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (UIViewController*) getTopMostViewController {
|
- (UIViewController*) getTopMostViewController {
|
||||||
UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController;
|
UIViewController *presentingViewController = [[UIApplication sharedApplication] keyWindow].rootViewController;
|
||||||
while (presentingViewController.presentedViewController != nil) {
|
while (presentingViewController.presentedViewController != nil) {
|
||||||
presentingViewController = presentingViewController.presentedViewController;
|
presentingViewController = presentingViewController.presentedViewController;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user