UISearchBar can not be disabled while the documentation suggests otherwise

Originator:scelis
Number:rdar://11156174 Date Originated:30-Mar-2012 12:12 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:iOS 5
Classification:UI/Usability Reproducible:Always
 
Summary:
A number of UISearchBar methods have documentation that suggest that UISearchBar can be disabled. These methods include:

imageForSearchBarIcon:state:
searchFieldBackgroundImageForState:
setImage:forSearchBarIcon:state:
setSearchFieldBackgroundImage:forState:

All of the documentation for these methods state that the valid control states include UIControlStateDisabled. However, there is no way to actually disable a UISearchBar. UISearchBar inherits from UIView, and there is no public way to access the UITextField within the bar.


Steps to Reproduce:
N/A


Expected Results:
I expect there to be a way to disable UISearchBars. Otherwise, I expect the documentation to remove references to UIControlStateDisabled as it does not appear to be a valid state.


Actual Results:
The documentation is currently misleading as UISearchBars cannot be disabled.


Regression:
No.


Notes:
I would prefer that functionality be added to allow UISearchBars to be disabled. Until that happens, the documentation should be fixed.

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!