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;

    }

}

posted @ 2016-02-24 19:11  偶阵雨ss33  Views(205)  Comments(0Edit  收藏  举报