开发者

Click UITableViewCell to set focus in UITextField in iPad

I have seen related questions asking how to set focus at startup with firstResponder, but this is a little different.

When I click on a certain UITableViewCell, I want to set the focus in开发者_如何学C a specific UITextField. Is there a way to set the focus of the UITextField in this manner?

Thanks.


You can override TouchesBegan on your custom TableViewCell to make the UITextField as the first responder


Assuming you have that cell you want then all you need to do.

[yourTextField becomeFirstResponder];

Also remember the setTags:(NSUInteger*) and viewWithTag: Methods to get cell subviews you have placed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜