Problem with setBackButtonBackgroundImage on UIBarButtonItem

Originator:ricardo.abc
Number:rdar://14834133 Date Originated:26-Aug-2013 12:02 PM
Status:Duplicate Resolved:
Product:iSO SDK Product Version:7
Classification:UI/Usability Reproducible:Always
 
26-Aug-2013 12:02 PM Ricardo Borelli:
Summary: iOS 7 isn't respecting the appearance proxy for UIBarButtonItem. The first time you see the button, it has no background but when you tap it to go back and then return to the view controller, it show the background.

Steps to Reproduce:

Use this code to set the background image when app starts:
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[UIImage imageNamed:@"my-image"]
                                                      forState:UIControlStateNormal
                                                    barMetrics:UIBarMetricsDefault];

Expected Results: Every back button has the desired background.

Actual Results: No background the first time a back button is displayed but appears after it's hit by the user.

Regression: It worked until iOS 6.1 but not working since the iOS 7 Beta 1.

Notes: The API isn't marked as deprecated, so it should be working.

[edit: Duplicate of 14589283]

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!