From b109565fde9baf68c17b709faee3816256616b77 Mon Sep 17 00:00:00 2001 From: Sebastien FOCK CHOW THO Date: Sat, 17 Aug 2019 22:57:57 -0500 Subject: [PATCH] Add supports for translucent nav bar This should be enough to fix the top padding found in the auth UI when setting the nav bar non translucent. Tested on multiple devices (with and without notch). These properties require iOS 7+ --- Auth/FirebaseAuthUI/FUIAuthPickerViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m b/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m index cbf6b50be15..86e48cf62ad 100644 --- a/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m +++ b/Auth/FirebaseAuthUI/FUIAuthPickerViewController.m @@ -91,6 +91,11 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil - (void)viewDidLoad { [super viewDidLoad]; + // Makes sure that embedded scroll view properly handles translucent navigation bar + if (!self.navigationController.navigationBar.isTranslucent) { + self.extendedLayoutIncludesOpaqueBars = true; + } + if (!self.authUI.shouldHideCancelButton) { UIBarButtonItem *cancelBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel