From d7f13b40883769ab88e6b2b5c00b8608d477916b Mon Sep 17 00:00:00 2001 From: Igor Khmurets Date: Tue, 17 Dec 2013 20:23:55 +0300 Subject: [PATCH] Popover dismissing fix --- api/MapsWithMeAPI.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/MapsWithMeAPI.m b/api/MapsWithMeAPI.m index f601312..37bd814 100644 --- a/api/MapsWithMeAPI.m +++ b/api/MapsWithMeAPI.m @@ -240,7 +240,11 @@ static NSString * mapsWithMeIsNotInstalledPage = MWMNavigationController * navController = [[MWMNavigationController alloc] initWithRootViewController:webController]; navController.navigationBar.topItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleDone target:navController action:@selector(onCloseButtonClicked:)]; - [[[UIApplication sharedApplication] delegate].window.rootViewController presentModalViewController:navController animated:YES]; + UIWindow * window = [[UIApplication sharedApplication].windows firstObject]; + if ([window.subviews count] == 2) + [[window.subviews lastObject] removeFromSuperview]; + + [window.rootViewController presentModalViewController:navController animated:YES]; } + (void)setOpenUrlOnBalloonClick:(BOOL)value