键盘回收
#pragma mark - TextField 代理方法
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[self.view endEditing:YES];
return YES;
}
#pragma mark - TextView 代理方法
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{ _scrollView.frame = CGRectMake(, -, JX_SCREEN_WIDTH, SCREEN_HEIGHT-SafeAreaTopHeight); return YES;
} - (void)textViewDidBeginEditing:(UITextView *)textView{ _scrollView.frame = CGRectMake(, SafeAreaTopHeight, JX_SCREEN_WIDTH, SCREEN_HEIGHT-SafeAreaTopHeight); }
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"]) { [self.beizhuTextView resignFirstResponder]; return NO;
} return YES;
}