uitableview - UITextField in custom UITableViewCell - keyboard not dismiss -
I have custom UITableViewCell with UITextField The problem is that I can not dismiss that keyboard.
In my TVC I have the UITextFieldDelegate and the ViewDidLoad method applies to me:
customCell.textField.delegate = self;
And of course:
- (zero) touches: touches the (NSASE *) event: (UIEvent *) event { CustomCell.textField resignFirstResponder]; } - (BOOL) textFieldShouldReturn: (UITextField *) TextField {[customCell.textField resignFirstResponder]; } no return; }
I tried to apply this code in my CustomTableViewCell class.
You have already set a representative of the textfield
- (BOOL) textFieldShouldReturn: (UITextField *) textField;
takes a textField
, so you did not need to rest the cell to use it because it is being passed to the representative so use it directly.
- (BOOL) textFieldShouldReturn: (UITextField *) textField {[textField resignFirstResponder];
Comments
Post a Comment