UINavigationBar loses transparency when a modal view is presented

Originator:mattswell
Number:rdar://9664985 Date Originated:23-Jun-2011 03:37 PM
Status:Closed Resolved:
Product:iOS Product Version:4.0
Classification:Other Bug Reproducible:Always
 
Summary:

UINavigationBar loses transparency when another view is presented modally on top of it. This causes data inside the view with the UINavigationBar to shift downwards as the modal view is animating upwards.

Steps to Reproduce:

Current view has UINavigationBar with transparency (usually inside UINavigationController). Present another controller modally.

Expected Results:

Modal view is presented, UINavigationBar transparency remains intact during animation.

Actual Results:

UINavigationBar loses transparency and views are shifted downwards (as expected if the UINavigationBar was made opaque). Modal view animates.

Regression:

Notes:

I've included a sample project (iOS 5, sorry. ARC is neat.) and I have a video on youtube illustrating the issue:

http://www.youtube.com/watch?v=KSFvzTR5Ejk

Example source: http://cl.ly/7lu2

Comments

I don't get it.

In your DetailViewController, in viewWillDisappear:, you set [self.navigationController.navigationBar setBarStyle:UIBarStyleDefault];, and you expect the navigation bar to stay transparent?

By guillaume.campagna at July 3, 2011, 7:59 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!