textview弹出的键盘,按return回收键盘

代理方法

#pragma mark UITextViewDelegate

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

{

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

    {

        [textView resignFirstResponder];

        

        

        return NO;

    }

    

    return YES;

}

你可能感兴趣的:(return,textview)