How do I check if an UNDO button was pressed on an iPhone or iPad? If the user presses UNDO button, I wish to return NO for this method of searchBar delegate.
"- (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
"
One thing I tried is, I check that when I press an UNDO button, [text isEqualToString:@""]
returns YES. But when I press the DELETE button on the keyboard, I guess my text would be @"" for DELETE button as well.
Is there a way to programmatically figure out which keyboard button has the user pressed?