键盘回收(text filed,textview)

键盘回收

#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;
}
上一篇:C# DataTable的Select()方法不支持 != 判断


下一篇:SqlServerException:拒绝对表对象的select,insert权限解决(新建账号导致的问题)