UITextView 的 return响应事件
在UITextView里没有UITextField里的- (BOOL)textFieldShouldReturn:(UITextField *)textField;直接的响应事件;那么在TextView里呢用:
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text; { if ([@"\n" isEqualToString:text] == YES) { [_feedBackTextView resignFirstResponder]; return NO; } returnYES; }