fix(ios): exit event not fired on swipe down (#737)
This commit is contained in:
parent
d5fba787d4
commit
bdbb1df44c
@ -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 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user