Skip to content

Commit f686b60

Browse files
authored
Merge pull request #788 from morganchen12/dismiss
Prevent interactive dismiss when cancel button is hidden
2 parents f029d98 + c81ce1f commit f686b60

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Auth/FirebaseAuthUI/FUIAuth.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ __attribute__((deprecated("Instead use authUI:didSignInWithAuthDataResult:error:
188188
@property(nonatomic, copy) NSArray<id<FUIAuthProvider>> *providers;
189189

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

Auth/FirebaseAuthUI/FUIAuthPickerViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ - (void)viewDidLoad {
102102
target:self
103103
action:@selector(cancelAuthorization)];
104104
self.navigationItem.leftBarButtonItem = cancelBarButton;
105+
} else {
106+
if (@available(iOS 13, *)) {
107+
self.modalInPresentation = YES;
108+
}
105109
}
106110
self.navigationItem.backBarButtonItem =
107111
[[UIBarButtonItem alloc] initWithTitle:FUILocalizedString(kStr_Back)

0 commit comments

Comments
 (0)