Skip to content

Commit b109565

Browse files
committed
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+
1 parent f9692ff commit b109565

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Auth/FirebaseAuthUI/FUIAuthPickerViewController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil
9191
- (void)viewDidLoad {
9292
[super viewDidLoad];
9393

94+
// Makes sure that embedded scroll view properly handles translucent navigation bar
95+
if (!self.navigationController.navigationBar.isTranslucent) {
96+
self.extendedLayoutIncludesOpaqueBars = true;
97+
}
98+
9499
if (!self.authUI.shouldHideCancelButton) {
95100
UIBarButtonItem *cancelBarButton =
96101
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel

0 commit comments

Comments
 (0)