carlos16196 was a good approach, but I would also tweak it by changing [text isEqualToString:[UIPasteboard generalPasteboard].string]
to [text containsString:[UIPasteboard generalPasteboard].string]
By doing this, you will detect when user pastes in the textview after other typed text that is not in the UIPasteboard.
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 boardif ([text containsString:[UIPasteboard generalPasteboard].string]) { // code to execute in case user is using paste} else { // code to execute other wise}return YES;}