Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions SMTagField.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,22 @@ -(void)layoutTags{
[tagDelegate tagField: self tagsChanged: tags];
}

-(BOOL)keyboardInputShouldDelete:(UITextField *)textField {
BOOL shouldDelete = YES;

if ([UITextField instancesRespondToSelector:_cmd]) {
BOOL (*keyboardInputShouldDelete)(id, SEL, UITextField *) = (BOOL (*)(id, SEL, UITextField *))[UITextField instanceMethodForSelector:_cmd];

if (keyboardInputShouldDelete) {
shouldDelete = keyboardInputShouldDelete(self, _cmd, textField);
}
}

if (![textField.text length] && [[[UIDevice currentDevice] systemVersion] intValue] >= 8) {
[self deleteBackward];
}

return shouldDelete;
}

@end