Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 status bar color during push animation.

My app has a solid gray navigation bar, and to fit with the iOS 7 design, want the status bar to be the same color.

To do this, I've set edgesForExtendedLayout = UIRectEdgeNone and extendedLayoutIncludesOpaqueBars = YES and have View controller-based status bar appearance set to YES in my plist. To create the gray color for the status bar, I've set the background color of my MainWindow to be the gray color. This works well except when there's a push or pop animation. During the animation, the status bar flashes color and looks like it has double the intensity of gray. When the animation ends, it changes back to the correct gray color.

Does anyone know what might be happening? Should I be setting the status bar color to match the navigation bar color differently?

like image 752
Woogie Avatar asked Sep 18 '13 23:09

Woogie


1 Answers

Are you using an background image or a tint color to set the background of the navigation bar?

If you use a background image (which it sounds like since you have a solid gray background), you need to make sure it is 64 points tall (128 pixel in retina). If you use the old iOS 6 dimensions (44 points), iOS 7 will fall back and not have it include the status bar.

For details of this behavior, check out Table 5-1, "Treatment of resizable background images for bars at the top of the screen" in the iOS 7 transition documentation.

Also, if this is the case you shouldn't need to set the edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars and View controller-based status bar appearance. You might need it for other stuff - but not for this.

If you want to still support iOS 6, you need to have two different background images, one of iOS 7 and above and a legacy version of iOS 6 and below. That should get you the effect you are looking for.

like image 118
Thomas Watson Avatar answered Sep 21 '22 22:09

Thomas Watson