I am having a problem keeping my keyboard active when I validate input and determine the user needs to make a change. It was suggested I use textFieldShouldEndEditing and return “no” to accomplish this.
I declared that in my code with an NSLog at the very beginning and I never get there. I did some research and found that it is declared in UITextField.h. I have a feeling I’m not getting that. I tried to import UITextField.h and got an error. Can someone tell me what I’m doing wrong and what I need to do to get textFieldShouldEndEditing called? Some documentation I found indicated this method is called when a text field is asked to resign first responder. I am doing that, but based on no NSLog entry I’m obviously not getting into the method. Thanks.
Make sure your class conforms to
UITextFieldDelegateand you’re setting it properly.And in your
.m.