Вам нужно создать подкласс UITableViewCell с UITextField в нем:
@interface CustomCell : UITableViewCell {
UILabel *cellLabel;
UITextField *cellTextField;
}
@property (nonatomic, retain) UILabel *cellLabel;
@property (nonatomic, retain) UITextField *cellTextField;
@end
А затем реализовать:
@implementation CustomCell
@synthesize cellLabel, cellTextField;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
cellLabel = [[UILabel alloc] initWithFrame:CGRectZero];
... // configure your label appearance here
cellTextField = [[UITextField alloc] initWithFrame:CGRectZero];
... // configure your textfield appearance here
}
return self;
}
И, наконец, используйте ваши собственные ячейки на:
- (CustomCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
CustomCell *cell = (CustomCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
... // configure your cell data source here
return cell;
}