Skip to content

Commit

Permalink
Merge pull request #788 from morganchen12/dismiss
Browse files Browse the repository at this point in the history
Prevent interactive dismiss when cancel button is hidden
  • Loading branch information
morganchen12 authored Oct 8, 2019
2 parents f029d98 + c81ce1f commit f686b60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Auth/FirebaseAuthUI/FUIAuth.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ __attribute__((deprecated("Instead use authUI:didSignInWithAuthDataResult:error:
@property(nonatomic, copy) NSArray<id<FUIAuthProvider>> *providers;

/** @property shouldHideCancelButton
@brief Whether to hide the canel button, defaults to NO.
@brief Whether to hide the cancel button, defaults to NO. On iOS 13, this also disables
the swipe-to-dismiss gesture.
*/
@property(nonatomic, assign) BOOL shouldHideCancelButton;

Expand Down
4 changes: 4 additions & 0 deletions Auth/FirebaseAuthUI/FUIAuthPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ - (void)viewDidLoad {
target:self
action:@selector(cancelAuthorization)];
self.navigationItem.leftBarButtonItem = cancelBarButton;
} else {
if (@available(iOS 13, *)) {
self.modalInPresentation = YES;
}
}
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:FUILocalizedString(kStr_Back)
Expand Down

0 comments on commit f686b60

Please sign in to comment.