Make sure that your header interface invokes <UITextViewDelegate>
Code:
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
replacementText:(NSString *)text
{
if([text ...){
textView.text = ...
}
return NO;
}
You can use the Range information too.