Re: Stupid (virtual) keyboard mistake... I think
Re: Stupid (virtual) keyboard mistake... I think
- Subject: Re: Stupid (virtual) keyboard mistake... I think
- From: William Squires <email@hidden>
- Date: Tue, 19 Jul 2011 19:46:49 -0500
Oops, should have stipulated: iOS 4 dev on Xcode 3.2.whatever.
On Jul 19, 2011, at 6:57 PM, William Squires wrote:
> What's the proper way to detect if the "Enter" key on the virtual (on-screen) keyboard in iOS is touched?
> Is this part of the UITextField delegate protocol? Or is it supposed to be the "Editing Did End" event you see when you right-click on the UITextField in question (in IB, of course)?
> I've tried both; singly and together, but I still can't figure out how to determine when the Enter key is tapped. Probably just a stoopid mistake on my part. The keyboard appears (in the simulator) when I click on the field, but I can't get it to go away unless I put a UIButton the size of the view under all the controls, and tie it's "Touch Up Inside" to an action on my view controller that just says
>
> -(IBAction)dismissKeyboard:(id)sender
> {
> [inputField resignFirstReponder];
> }
>
> Surely there's a better way, right?
> Also, how do I get the "Enter" key to show up in the Numpad-style keyboard, like in the phone app (which also has an "add to contacts" button as well)? Is this a custom view, or is there a way to make this numpad keyboard do this normally? Personally, I'm guessing Apple violated (or severely bent) their own HIG guidelines by not reusing the numpad keyboard, or they'd have realized they're missing something (namely, the "Enter" key), and would have changed it.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden