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];  
based on what you are trying to do;

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -