Keyboard not hiding

Hello!


On iOS, I am using a TableViewController with 4 sections :

3 of them contains FieldText and

the 4th section a button.


I expected the action buttonTapped to hide the keyboard but I think the keyboard is not hiding because one of the the textField is keeping the focus...


So far, as a beginner, I dont know what to do.

Accepted Reply

Does your code include anything similar to this?



- (BOOL)textFieldShouldReturn:(UITextField *)textField {
      return [textField resignFirstResponder];
   }

Replies

How do you hide keyboard when you leave the textFields ? In the action for which event ?

Please, show the code.


You should connect the IBAction that you use for Editing Did End also for the event Did End on exit (the events are visible in Connections Inspector when you select a TextField in IB)

Does your code include anything similar to this?



- (BOOL)textFieldShouldReturn:(UITextField *)textField {
      return [textField resignFirstResponder];
   }

Hey


Thanks a lot, the missing step was calling for resignFirstResponder method on UITextField outlet.


Now its working 🙂

Glad you worked it out, thanks for the followup and good luck w/your app(s).


Ken