Skip to content

Commit

Permalink
fix(ios): set statusbar height to top of safearea view (#12408)
Browse files Browse the repository at this point in the history
Fixes TIMOB-28323
  • Loading branch information
build authored Jan 22, 2021
1 parent 23c0f6c commit 28c62f7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ - (void)viewWillAppear:(BOOL)animated; // Called when the view is about to made
- (void)viewDidAppear:(BOOL)animated; // Called when the view has been fully transitioned onto the screen. Default does nothing
{
[self updateTitleView];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
[self updateStatusBarView];
#endif
[super viewDidAppear:animated];
}

Expand Down Expand Up @@ -1079,6 +1082,11 @@ - (void)updateStatusBarView
CGRect frame = keyWindow.windowScene.statusBarManager.statusBarFrame;
UIView *view = [keyWindow viewWithTag:TI_STATUSBAR_TAG];
if (view) {
id top = [[self safeAreaViewProxy] valueForKey:@"top"];
if (top && [top floatValue] != frame.size.height) {
//TIMOB-28323: Once fixed by apple, remove it.
frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, [top floatValue]);
}
view.frame = frame;
}
}
Expand Down

0 comments on commit 28c62f7

Please sign in to comment.