#pragma textDelegate
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
//获取焦点后清空内容
// textField.text = @"";
textField.inputView=[[UIView alloc]initWithFrame:CGRectZero];
self.CurrEnterItem = textField;
self.userIsInTheMiddleofEnterANumber = true;
return YES;
}
本文介绍了一个UITextField代理方法的实现,该方法在文本字段开始编辑时执行特定操作,如清空内容和设置输入视图。
854

被折叠的 条评论
为什么被折叠?



