Skip to content

Commit

Permalink
Merge pull request #134 from frankyjuang/master
Browse files Browse the repository at this point in the history
Disable swipe to dismiss gesture for modal
  • Loading branch information
jdnichollsc authored Jan 7, 2020
2 parents ce42ee7 + ce0f8be commit fb8f617
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/RNInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ + (BOOL)requiresMainQueueSetup
UINavigationController *safariHackVC = [[UINavigationController alloc] initWithRootViewController:safariVC];
[safariHackVC setNavigationBarHidden:true animated:false];

// To disable "Swipe to dismiss" gesture which sometimes causes a bug where `safariViewControllerDidFinish`
// is not called.
safariVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
safariHackVC.modalPresentationStyle = [self getPresentationStyle: modalPresentationStyle];
if(animated) {
safariHackVC.modalTransitionStyle = [self getTransitionStyle: modalTransitionStyle];
Expand Down

0 comments on commit fb8f617

Please sign in to comment.