4

At certain times in my app I am hiding the UIStatusBar on iOS 7.

-(UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
    return UIStatusBarAnimationFade;
}

-(BOOL)prefersStatusBarHidden {
    if (self.state == StateModal) {
        return YES;
    }
    return NO;
}

However, this the y-origin of the view controller's UINavigationBar. It moves up since there is not UIStatusBar visible, but I would like to retain the height of the status bar, but makes it's content invisible.

Is this possible? I don't have to take iOS 6 into account, just iOS 7.

runmad
  • 14,846
  • 9
  • 99
  • 140

1 Answers1

0

You can change current window windowLevel to UIWindowLevelStatusBar, when controller is appeared https://stackoverflow.com/a/21158994/2035054

Community
  • 1
  • 1
Igor Palaguta
  • 3,579
  • 2
  • 20
  • 32