carlos16196 was a good approach, but I would also fine-tune it by changing [text isEqualToString:[UIPasteboard generalPasteboard].string] to [text containsString:[UIPasteboard generalPasteboard].string]
This way you will find when the user inserts text into the text box after another typed text that is not in the UIP file.
This is the code:
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { // Here we check if the replacement text is equal to the string we are currently holding in the paste board if ([text containsString:[UIPasteboard generalPasteboard].string]) { // code to execute in case user is using paste } else { // code to execute other wise } return YES; }
source share