Determine height of status bar before it shows?

There is a view in my app where the status bar can be shown or hidden on demand and the transition is animated. When the extended status bar is active, it pushes my view 20pt down and offscreen.


To fix this, I need to trigger an animation to resize the view in the same block where I show the status bar:


- (BOOL)prefersStatusBarHidden { 
  return _statusHidden; 
}

- (BOOL)prefersStatusBarUpdateAnimation { 
  return UIStatusBarAnimationSlide; 
}

- (void)showStatusBar:(CGFloat)delay {
  _statusHidden = NO;
  
  CGFloat height = CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
  // height = 0 

  // how do I set this value?
  CGFloat extendedStatusBarHeight = ??? - 20; 

  [UIView animateWithDuration:0.2f delay:delay options:0 animations:^{ 
     [self setNeedsStatusBarAppearanceUpdate]; 
     self.wrapper.frame = CGRectMake(x,y,w,h - extendedStatusBarHeight) 
  } completion:nil]; 
}


How can I get the height of the status bar before it shows?

Determine height of status bar before it shows?
 
 
Q