What is the delegate for the UITextField connected to? Have you made sure that the delegate functions, particularly - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
is returning the right thing (in this case YES)?
+1
A:
Adam Eberbach
2010-05-03 03:37:33
The tutorial doesn't ask for a connection to a delegate, just one to an IBOutlet in the view controller. I've run through another tutorial that also has a UITextField without a delegate, simply connected to the view controller's IBOutlet, and that one worked. If it's any help, the tutorial I'm having difficulty with is from "Beginning iPhone 3 Development" by Mark and LaMarche.
Norm
2010-05-03 16:03:12
I "fixed" the problem by starting over, and that second attempt worked. I'm kind of disturbed about that, because without knowing the error, I have no idea what to do if something similar comes up again.
Norm
2010-06-04 02:36:25
What do you mean with starting over? Creating the hole nib again or the hole app? I've tried adding UITextFields to other nibs in the app and i have the same problem, the keyboard just doesn't pops up.
sicario
2010-08-28 17:36:18
I recreated the entire app, since I had no idea what setting where might have messed things up.
Norm
2010-09-07 20:56:46
A:
Not sure if this is anyone else's problem but I was using a TextField in a TabBar controller displayed modally and I added the shake gesture in my main view controller. This unfortunately meant I was setting [self becomeFirstResponder] in the viewDidLoad. In that case when my modal view displayed it was not becoming the first responder and hence the keyboard did not display.
To fix it I added [self resignFirstResponder] just prior to calling the modal display and all is well once more! Yay (only took five days to figure that out).
JC Software
2010-05-25 07:27:38