mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2026-07-31 00:02:14 +08:00
get real top most view controller
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user