UITextField return key issue

Discussion in 'iOS Programming' started by Starseeker, Oct 8, 2008.

  1. Starseeker macrumors newbie

    Oct 8, 2008
    Hi everybody, I've some issue about my actual working project. Basically, I've created a UITextField in my latest view for password input. So, I've set in Interface Builder the control's properties (Type: Number Pad and Secure checkbox checked), as well as connected the outlet from my code and written the textFieldShouldReturn: delegate method in my .m controller file (and set the text field object to be the first responder as the view is displayed).
    Now, while testing and debugging the application on my developer's company device, I saw that in the numeric keypad that shows up is missing a "return" key, so I the delegate method is never invoked... what am I missing? :confused:
  2. Starseeker thread starter macrumors newbie

    Oct 8, 2008
    Hi, I wanted to inform all of you that I've solved and successfully replicated 1Password's 4 code digit view request's behavior.
    Basically, instead of using an IBAction (for resign and become first responder) bound to a button, you can implement one NSNotification (to be more specific I used UITextFieldTextDidChangeNotification) for each UITextField, thanks to Cocoa's Notificiations system! ;)

    Thanks to everybody for the suggestions and help!

Share This Page