UITextView 监听 return key的改变

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range

 replacementText:(NSString *)text

{

    if([text isEqualToString:@"\n"]){

        [self.textView endEditing:YES];

        [self whenTheTextViewEndEditing];

        return NO;

    }

}

你可能感兴趣的:(UITextView 监听 return key的改变)