Disabling an UIBarButtonItem from an Action Sheet doesn't change its appearance

Originator:alex
Number:rdar://14069474 Date Originated:05-Jun-2013 04:42 PM
Status:Open Resolved:
Product:iOS SDK Product Version:6.0
Classification:UI/Usability Reproducible:Always
 
Summary:
Disabling a toolbar's UIBarButtonItem as a result of a user choice in an UIActionSheet doesn't "visually" disable the button if the button is of type Plain. The button is not clickable (as expected), but still appears enabled.

A sample Xcode project demonstrating the issue is attached. It contains an empty view with a toolbar containing a button (with a trash icon). Pressing the toolbar button opens an action sheet, with an action that disables the toolbar button. Choosing this action demonstrates the problem: the button isn't grayed out like it should be.
There is also a button in the view toggling the button's "enabled" property to show that it works properly outside of an action sheet.

https://dl.dropboxusercontent.com/u/3659886/ActionSheetBug.zip

Steps to Reproduce:
Make a view with a toolbar containing an UIBarButtonItem.
Set the bar button item's type to Plain.
Make the button open an action sheet, and in actionSheet:clickedButtonAtIndex: delegate method, set the button's "enabled" property to NO.

Expected Results:
When the action sheet's button is pressed, the action sheet should be dismissed and the button should be disabled and appear grayed out.

Actual Results:
The button doesn't appear grayed out. Note: the button is actually disabled, tapping it doesn't do anything (not even highlight it). But it still appears enabled (white icone instead of gray)

Regression:
The problem happens in iOS 6.0 and higher. It is not occurring on iOS 5.

Notes:
This doesn't happen with a button of type Bordered.

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!