When UIButton.enabled is toggled programmatically, its state is broken during a touch event

Originator:aoberoi
Number:rdar://16822519 Date Originated:06-May-2014 01:41 AM
Status:Open Resolved:
Product:iOS Product Version:7.1, 7.1.1
Classification:Serious Bug Reproducible:100%
 
Summary:
If a UIButton's enabled property is programmatically changed while also its titleLabel is changed, then during a touch on the button the titleLabel will change back to what it was in the disabled state.

Steps to Reproduce:
1. Run the attached app.
2. Wait for the button in the center to become enabled and read "Enabled"
3. Long tap the button. Note that the button's titleLabel changed to "Disabled" and the button is still enabled. Also note that the change happened before the touch was lifted.

Expected Results:
The button's titleLabel should still show "Enabled".

Actual Results:
The button's titleLabel shows "Disabled". It changed during the touch.

Version:
7.1, 7.1.1

Notes:


Configuration:


Attachments:
'ButtonTouchBug.zip' was successfully uploaded. (http://cl.ly/3c183x3V3Z0E)

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!