Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField keyboard doesn't appear

I have a very simple screen with an UITextField with the default configuration, nothing special.

When I touch the UITextField, the keyboard doesn't pops up.

I haven't any custom control, behavior or anything else, just that, but it doesnt'work.

I've done this in previous apps iPhone/iPad apps already on the AppStore but i can't figure out what's going wrong here.

The UITextField is created in Interface Builder, in the nib file.
I've been doing some research and i added an IBAction in the UIViewController for UItextField TouchDown event and the IBOutlet for the UITexField.
In the first line of the code i added:

[textFild becomeFirstResponder];

That's the default behavior of the UITextField, when you touch it, it becomes the first responder asking the system to show the keyboard.
I debugged it and it runs that line, but the keyboard still doesn't shows up.
Thanks in advance.

like image 764
jsan Avatar asked Aug 28 '10 06:08

jsan


2 Answers

Many times your code is right, it's just about the settings of your Xcode or the Simulator.

Try Toggling Keyboard Software in the Simulator

Simulator --> Hardware --> Keyboard --> Toggle Software Keyboard

OR just simply hit Command + K it would do the same thing

like image 99
mfaani Avatar answered Nov 19 '22 05:11

mfaani


One thing you should check is to make sure the containing view (the UIView that contains all the controls), which is the View icon in Interface Builder nib viewer, has User Interaction Enabled checked. If the parent container doesn't have this checked, even if the individual controls do, you will see this behavior.

like image 6
Matt Spradley Avatar answered Nov 19 '22 06:11

Matt Spradley