From bdbb1df44c57c9427149b40294f082abe1f466ce Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 22 Jun 2020 11:44:39 +0200 Subject: [PATCH] fix(ios): exit event not fired on swipe down (#737) --- src/ios/CDVWKInAppBrowser.h | 2 +- src/ios/CDVWKInAppBrowser.m | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVWKInAppBrowser.h b/src/ios/CDVWKInAppBrowser.h index e339be156..2f650b8c4 100644 --- a/src/ios/CDVWKInAppBrowser.h +++ b/src/ios/CDVWKInAppBrowser.h @@ -49,7 +49,7 @@ @end -@interface CDVWKInAppBrowserViewController : UIViewController { +@interface CDVWKInAppBrowserViewController : UIViewController { @private CDVInAppBrowserOptions *_browserOptions; NSDictionary *_settings; diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index 1ec20653d..64fae787e 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -290,6 +290,7 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate nav.orientationDelegate = self.inAppBrowserViewController; nav.navigationBarHidden = YES; nav.modalPresentationStyle = self.inAppBrowserViewController.modalPresentationStyle; + nav.presentationController.delegate = self.inAppBrowserViewController; __weak CDVWKInAppBrowser* weakSelf = self; @@ -306,7 +307,6 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate strongSelf->tmpWindow = [[UIWindow alloc] initWithFrame:frame]; } UIViewController *tmpController = [[UIViewController alloc] init]; - [strongSelf->tmpWindow setRootViewController:tmpController]; [strongSelf->tmpWindow setWindowLevel:UIWindowLevelNormal]; @@ -1257,5 +1257,10 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id