iOS textview中设置键盘类型和换行的问题

-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text

{

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

    [textView resignFirstResponder];

    return NO;

}

return YES;

}

你可能感兴趣的:(iOS textview中设置键盘类型和换行的问题)