UITextField's implementation of UITextInput protocol

Originator:oliver.drobnik
Number:rdar://19263531 Date Originated:15 Dec 2014
Status:Open Resolved:
Product:iOS Product Version:8.1.2 (12B440)
Classification:Other Bug Reproducible:Always
 
Summary:
UITextField's header states that it is implementing the UITextInput protocol. However this is only partially true.

Our tests show that -deleteBackward and -replaceRange:withText: are not called on subclasses of UITextField. Only -insertText from UIKeyInput is being called.

This is an inconsistency that confuses developers requiring subclassing of UITextField.

Steps to Reproduce:
- Subclass UITextField
- override -deleteBackward
- set a breakpoint there
- use this subclass in an app

Expected Results:
- When the user hits the backspace key the -deleteBackward method should be called.
- When the user inserts or replaces ranges of text, the -replaceRange:withText: method should be called

Actual Results:
- -deleteBackward is not called
- -replaceRange:withText is not called

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!