Skip to content

Commit

Permalink
Prevent interactive dismiss when cancel button is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
morganchen12 committed Oct 8, 2019
1 parent f029d98 commit c81ce1f
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 c81ce1f

Please sign in to comment.