fix(ios): exit event not fired on swipe down (#737)

This commit is contained in:
jcesarmobile 2020-06-22 11:44:39 +02:00 committed by GitHub
parent d5fba787d4
commit bdbb1df44c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -290,6 +290,7 @@ static CDVWKInAppBrowser* instance = nil;
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 @@ static CDVWKInAppBrowser* instance = nil;
strongSelf->tmpWindow = [[UIWindow alloc] initWithFrame:frame];
}
UIViewController *tmpController = [[UIViewController alloc] init];
[strongSelf->tmpWindow setRootViewController:tmpController];
[strongSelf->tmpWindow setWindowLevel:UIWindowLevelNormal];
@ -1257,5 +1257,10 @@ BOOL isExiting = FALSE;
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}
#pragma mark UIAdaptivePresentationControllerDelegate
- (void)presentationControllerWillDismiss:(UIPresentationController *)presentationController {
isExiting = TRUE;
}
@end //CDVWKInAppBrowserViewController