Quote:
Originally Posted by zeeshan
funnylookinhat - Did you get success in putting UITextField into your UITableView. Please let me know if you done it.
Thanks in advance
|
Yes, there are a couple of ways you can do this.
The easiest way is to create UITableViewCells with Interface Builder, and put text fields in them. Link both the cell and the text field to whatever controller manages the datasource/delegate for the UITableView.
So for example, let's say you create the following:
Code:
IBOutlet UITableViewCell *cell1;
UITextField *text1;
IBOutlet UITableViewCell *cell2;
UITextField *text2;
IBOutlet UITableViewCell *cell3;
UITextField *text3;
In your cellForRowAtIndexPath function you would do the following:
Code:
if([indexPath row] == 0) {
return cell1;
} else if([indexPath row] == 1) {
return cell2;
} else {
return cell3;
}
Then you can just reference the text fields as normal - connect them with interface builder, etc.
Does that help?