Subclasses of UITextField do not receive UIKeyInput insertText: messages
| Originator: | skunkworks | ||
| Number: | rdar://22462432 | Date Originated: | 8/27/2015 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.0 |
| Classification: | Reproducible: | Yes |
Summary:
Custom subclasses of UITextField do not receive the insertText: UIKeyInput protocol message when a user types in the text field.
They do receive deleteBackward when the user deletes a character.
Steps to Reproduce:
1. Create a custom subclass of UITextField.
2. Override insertText:
- (void)insertText:(NSString *)text {
NSLog(@"Inserted %@", text);
}
3. Display the custom text field from a view controller in the app
4. Run the app in an iOS 9 Simulator (e.g. iOS 9.0 - 13A4325c)
5. Tap on the text field and type characters
Expected Results:
insertText: is called, and the inserted text gets logged to the console.
Actual Results:
insertText: is not invoked.
Version:
iOS 9.0 (13A4325c)
Notes:
This does work in iOS 8 and iOS 7.
Configuration:
iOS Simulator running 9.0 13A4325c
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!