Appearance customization of backBarButtonItems conflicts with manual customization

Originator:futuretap
Number:rdar://12854660 Date Originated:
Status:Open Resolved:
Product:iPhone SDK Product Version:6.0
Classification:UI/Usability Reproducible:Always
 
Situation:
The appearance proxy for back buttons is used to configure custom background images for all control states.
Then, in a particular view controller of a navigation hierarchy, the back button should be customized differently. Since the Appearance proxy doesn't permit to restrict the customization to a specific leaf in the navigation hierarchy, I tried it the naïve way by reconfiguring the back button manually (in this case I wanted to nil the background image to use the system default):

[self.navigationItem.backBarButtonItem setBackButtonBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

This does not work when the new view controller is immediately pushed after this.
It does work if I push after a delay of 0.5 seconds.

A workaround is to use the appearance proxy for reconfiguring everything and then reconfiguring everything back. But this seems not ideal because it also affects the back button of the old view controller that is pushed out.

Comments


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!