Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put a UITextField inside of a UITableViewCell (grouped)?

How to put a UITextField inside of a UITableViewCell (grouped)? I want a user to be able to edit it.

like image 636
RexOnRoids Avatar asked Mar 21 '10 14:03

RexOnRoids


2 Answers

Add the UITextField as an subview of the UITableViewCell's contentView:

[mycell.contentView addSubview:view];
like image 154
diederikh Avatar answered Oct 17 '22 00:10

diederikh


Apple's own UICatalog demo application has an example of placing UITextFields in Grouped UITableView Cells: http://developer.apple.com/iphone/library/samplecode/UICatalog/index.html

Check the contents of TextFieldController.m

Plus there's lots of other great code there for working with UIKit Objects.

like image 24
Eric Schweichler Avatar answered Oct 17 '22 01:10

Eric Schweichler