From c81ce1f47baa61499c507f697f63ef0e2265e083 Mon Sep 17 00:00:00 2001 From: Morgan Chen Date: Tue, 8 Oct 2019 11:35:50 -0700 Subject: [PATCH] Prevent interactive dismiss when cancel button is hidden --- Auth/FirebaseAuthUI/FUIAuth.h | 3 ++- Auth/FirebaseAuthUI/FUIAuthPickerViewController.m | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Auth/FirebaseAuthUI/FUIAuth.h b/Auth/FirebaseAuthUI/FUIAuth.h index df8f3183afd..ff38752a2de 100644 --- a/Auth/FirebaseAuthUI/FUIAuth.h +++ b/Auth/FirebaseAuthUI/FUIAuth.h @@ -188,7 +188,8 @@ __attribute__((deprecated("Instead use authUI:didSignInWithAuthDataResult:error: @property(nonatomic, copy) NSArray> *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; diff --git a/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m b/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m index 86e48cf62ad..039914a0767 100644 --- a/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m +++ b/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m @@ -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)