How to check if the UNDO button was pressed on the iPhone or iPad? If the user clicks the UNDO button, I want to return NO for this delegate searchBar method.
" - (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text"
One thing I tried, I check that when I press the UNDO button, it [text isEqualToString:@""]returns YES. But when I press the DELETE button on the keyboard, I think my text will be @ "" for the DELETE button.
Is there a way to programmatically determine which keyboard button is pressed by the user?
source
share