Telling a UITextField to become first responder while embedded in a UITableViewCell
Posted
by Jasarien
on Stack Overflow
See other posts from Stack Overflow
or by Jasarien
Published on 2009-11-14T00:42:15Z
Indexed on
2010/05/10
18:34 UTC
Read the original article
Hit count: 514
I have a UITextField that is a subview of a UITableViewCell.
When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I am trying:
[myTextField becomeFirstResponder];
This returns NO
all the time, regardless of when it's called, which according to the docs means the text field refused to become first responder... What am I doing wrong?
Edit:
The text field properly responds to being touched. It bring up the keyboard then. It's only when telling it to become first responder programmatically that the problem happens.
© Stack Overflow or respective owner