2

Attached are a few screenshots from my app in the midst of UIModalTransitionStyleFlipHorizontal

enter image description here

enter image description here

enter image description here

enter image description here

I have changed the statusbarstyle to Black in info.plist and I have set the background color or MainWindow.xib to black. Yet, during the UIModalTransitionStyleFlipHorizontal the background behind the statusbar is white. Any idea what I might be doing wrong here? and how I maybe able able to fix this (i.e. get rid the white)?

UPDATE: Here's what my statusbar starts looking like, if I set UIStatusBarStyle to UIStatusBarStyleBlackTranslucent.

enter image description here

So, there is definitely something white behind the statusbar. :-(

Sam J.
  • 685
  • 1
  • 8
  • 22

1 Answers1

1

There are two option possible..

  1. In Info.plist file add the below

    • UIStatusBarStyle UIStatusBarStyleBlackTranslucent or
    • UIStatusBarStyle UIStatusBarStyleBlackOpaque or
    • UIStatusBarStyle UIStatusBarStyleDefault
  2. Add the source in your application.

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];

or

 [[UIApplication sharedApplication] 
          setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:NO];

or

[[UIApplication sharedApplication] 
      setStatusBarStyle:UIStatusBarStyleDefault animated:NO];

Update:

for hide status bar

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
Bharathi D
  • 953
  • 1
  • 15
  • 28
  • Thanks, I have tried both, but I'm using `UIStatusBarStyle UIStatusBarStyleBlackOpaque` in Info.plist and `[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:NO];` in source. Just using opaque black instead of translucent, still during UIModalTransitionStyleFlipHorizontal the statusbar background shows a white as you can see in the screenshots above. – Sam J. Aug 17 '12 at 07:32
  • Tried. That just changes the color of the status bar when application is active. I can still see 20 pixels of white above the Navigation bar during UIModalTransitionStyleFlipHorizontal – Sam J. Aug 17 '12 at 07:44
  • Please read my question again, my friend. And, take a look at the screenshots attached. Do you see the white above the navigation bar while the view is flipping? That's the white I want to get rid of. – Sam J. Aug 17 '12 at 08:59
  • Same issue with presentmodalviewcontroller.. during animation the status bar becomes translucent... – fvisticot Sep 15 '12 at 22:34