Pregunta

I've noticed some interesting behavior with an app in iOS7. The navbar normally has the following color:

enter image description here

On all real devices, when the app is backgrounded or opened up, the navbar is temporarily covered with a black almost gradient mask that looks like this:

enter image description here

In the simulator, when the app is open and is backgrounded, I get the same black mask over it but the black is slightly shorter from top to bottom, but when it is opened up again I get the following weird white streak:

enter image description here

This is all temporary, and once the app finishes launching it goes away. Does anyone know what would cause this to happen?

¿Fue útil?

Solución

I finally tracked down the issue to the following code in a table view controller I had:

if( IS_OS_7_OR_LATER ){
     self.edgesForExtendedLayout = UIRectEdgeNone;
     self.extendedLayoutIncludesOpaqueBars = YES;
}

The weird thing is, I've used this a million times to make the tableView properly sit under the navigation bar rather than just under it, so normally without this code it doesn't work right on iOS7 - but for some reason it does now. I'll have to look more into that... For some reason removing it from all my tableviews fixes the problem, but removing it from my regular view controllers fixes the navbar color problem, but makes the view's sit under the nav bar again.

Otros consejos

I solved this issue by making sure I checked "Under Top Bars" in storyboard on the View Controller's attributes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top