UITextView: when editable and selectable properties are NO, accessing UITextInputTraits properties crashes app.

Originator:oliver
Number:rdar://15063164 Date Originated:24-Sep-2013
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:Serious Bug Reproducible:Always
 
If you have a UITextView and you set both the editable and selectable properties to NO, if you then access any of the properties defined on the UITextInputTraits protocol your app will crash with an "unrecognized selector sent to instance" exception.

The selectable property is new in iOS 7.  But in iOS 6 if the editable property was NO you could still access the UITextInputTraits properties without a problem.

Calling respondsToSelector: on a UITextView for any of the UITextInputTraits properties returns YES.  One would expect to be able to call the methods if the instance reports that it responds to those selectors.

Note that this bug only seems to express when the UITextView is created in a Storyboard or XIB. UITextView's created in code (with minimal setup, basically just setting text, frame, selectable and editable) work as expected (ie, don't crash).

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!