UITextField subclasses do not receive -deleteBackward anymore
| Originator: | jkao | ||
| Number: | rdar://18103699 | Date Originated: | 2014-08-22 |
| Status: | open | Resolved: | no |
| Product: | iOS | Product Version: | iOS 8.0 [12A4345d] |
| Classification: | Reproducible: | always |
Summary:
On iOS 7, subclasses of UITextField receive the -deleteBackward message when the backspace key is pressed, even when the text field is empty. On iOS 8, subclasses of UITextField never receive -deleteBackward. This makes it impossible to detect backspace on an empty text field, which is necessary for implementing e.g. token field controls.
Steps to Reproduce:
Subclass UITextField and override deleteBackward with:
- (void)deleteBackward
{
NSLog(@"deleteBackward");
[super deleteBackward];
}
Expected Results:
Should see "deleteBackward" every time backspace is pressed.
Actual Results:
This works fine on iOS 7. On iOS 8, the method is never called.
Version:
iOS 8.0 (12A4345d)
Notes:
Attached sample project.
Configuration:
any
Attachments:
'TestDeleteBackward.zip' was successfully uploaded.
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!
closed as a dupe of rdar://17852892