CB-11136: (ios) Fix InAppBrowser when closing with WKWebView

This closes #187
This commit is contained in:
Manu Mtz.-Almeida 2016-09-19 22:51:08 +02:00 committed by Shazron Abdullah
parent d735649fcd
commit f32917df31

View File

@ -239,7 +239,14 @@
// Run later to avoid the "took a long time" log message.
dispatch_async(dispatch_get_main_queue(), ^{
if (weakSelf.inAppBrowserViewController != nil) {
[weakSelf.viewController presentViewController:nav animated:YES completion:nil];
CGRect frame = [[UIScreen mainScreen] bounds];
UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:frame];
UIViewController *tmpController = [[UIViewController alloc] init];
[tmpWindow setRootViewController:tmpController];
[tmpWindow setWindowLevel:UIWindowLevelAlert];
[tmpWindow makeKeyAndVisible];
[tmpController presentViewController:nav animated:YES completion:nil];
}
});
}