Skip to content
Permalink
Browse files
fix(ios): exit event not fired on swipe down (#737)
  • Loading branch information
jcesarmobile committed Jun 22, 2020
1 parent d5fba78 commit bdbb1df44c57c9427149b40294f082abe1f466ce
Showing 2 changed files with 7 additions and 2 deletions.
@@ -49,7 +49,7 @@

@end

@interface CDVWKInAppBrowserViewController : UIViewController <CDVScreenOrientationDelegate,WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler>{
@interface CDVWKInAppBrowserViewController : UIViewController <CDVScreenOrientationDelegate,WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler,UIAdaptivePresentationControllerDelegate>{
@private
CDVInAppBrowserOptions *_browserOptions;
NSDictionary *_settings;
@@ -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<UIVi
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}

#pragma mark UIAdaptivePresentationControllerDelegate

- (void)presentationControllerWillDismiss:(UIPresentationController *)presentationController {
isExiting = TRUE;
}

@end //CDVWKInAppBrowserViewController

0 comments on commit bdbb1df

Please sign in to comment.