Skip to content

Commit

Permalink
Merge pull request #112 from Capgemini-nantes-df/master
Browse files Browse the repository at this point in the history
get real top most view controller
  • Loading branch information
EddyVerbruggen authored Mar 15, 2018
2 parents 4324168 + a429424 commit 206b7e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ios/Toast+UIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ - (void)showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id
}

- (UIViewController*) getTopMostViewController {
UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController;
UIViewController *presentingViewController = [[UIApplication sharedApplication] keyWindow].rootViewController;
while (presentingViewController.presentedViewController != nil) {
presentingViewController = presentingViewController.presentedViewController;
}
Expand Down

0 comments on commit 206b7e0

Please sign in to comment.