设置UITextfield不能编辑
遵守UITextFieldDelegate 协议, 设置 tf.delegate = self;
然后在该方法中这样做
- (void)textFieldDidBeginEditing:(UITextField *)textField {
UITextField *tf = [self.view viewWithTag:401];
[tf resignFirstResponder];
}
遵守UITextFieldDelegate 协议, 设置 tf.delegate = self;
然后在该方法中这样做
- (void)textFieldDidBeginEditing:(UITextField *)textField {
UITextField *tf = [self.view viewWithTag:401];
[tf resignFirstResponder];
}