textView 的ReturnKey点击处理
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"]) {
[textView resignFirstResponder];
/// 调用你需要处理的事情 ///
return NO;
}
return YES;
}
textField 的ReturnKey点击处理
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
/// 调用你需要处理的事情 ///
return YES;
}