2

I have an application where I present an UIImagePickerController and I need to hide the status bar. The method I use to hide it works on iOS devices with 6.X OS and on iPhone/iPod Touch with 7.0, but the status bar is still visible on iPad/iPad mini devices with 7.0 OS.

Can someone tell me the reason why is not working on iOS 7.0 iPad devices?

Mutawe
  • 6,464
  • 3
  • 47
  • 90
Mihai Popa
  • 892
  • 1
  • 8
  • 25

2 Answers2

3

Add this to your Plist file:

UIViewControllerBasedStatusBarAppearance and set it to NO

and

UIStatusBarHidden and set that one to YES

Mikael
  • 3,572
  • 1
  • 30
  • 43
  • 1
    I set the Plist field to NO with no result. When I also added `[[UIApplication sharedApplication] setStatusBarHidden:NO];` it worked fine. I don't understand why I had to add this line also. – Mihai Popa Nov 25 '13 at 13:07
  • 1
    Did this really work for you? I have a same/similar problem in all of my iPhone targetted apps when running them on iPad mini only. No problem with iPad 4th gen. http://stackoverflow.com/questions/22452638/status-bar-visible-on-ipad-mini-despite-setting-uiviewcontrollerbasedstatusbarap – Jonny Mar 17 '14 at 12:01
1

add this method to your viewcontroller Note:Use this when you want dynamically to hide status bar

- (BOOL)prefersStatusBarHidden
{
  return YES;
}
the1pawan
  • 1,194
  • 9
  • 26
  • I tried this also in combination with `[self setNeedsStatusBarAppearanceUpdate]` and the bar still appears. – Mihai Popa Nov 25 '13 at 13:06