Fixed crash on iPad when pressing Close button in "MWM is not installed" dialog. Also display dialog on top of everything on iPad in
This commit is contained in:
parent
e44bd8b9a9
commit
105fc9133c
1 changed files with 5 additions and 1 deletions
|
@ -243,7 +243,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];
|
||||
UIViewController * rootVC = [UIApplication sharedApplication].delegate.window.rootViewController;
|
||||
// This check below is needed to avoid crash in Guides on Close button, and to display this dialog on top of all windows
|
||||
if ([rootVC isKindOfClass:UISplitViewController.class])
|
||||
rootVC = [((UISplitViewController *)rootVC).viewControllers objectAtIndex:0];
|
||||
[rootVC presentModalViewController:navController animated:YES];
|
||||
}
|
||||
|
||||
+(void) setOpenUrlOnBalloonClick:(BOOL)value
|
||||
|
|
Reference in a new issue