Я посмотрел один из моих старых проектов и обнаружил, что тогда я немного по-другому работал. Вот что я сделал:
cell = [self.aTableView dequeueReusableCellWithIdentifier:kPlaceCell];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier:kPlaceCell] autorelease];
}
//PlaceField = An Instance of UITextfield, which I implemented as classvar.
[self.placeField removeFromSuperview];
// setting frame and font for your textfield. If you have static text in your Textlabel you should have an higher x so maybe CGRectMake (1, 100, 218, 39)
self.placeField.frame = CGRectMake(1, 1, 318, 39);
self.placeField.font = [UIFont boldSystemFontOfSize:18.0f];
//Adding your UITextfield to the UITableViewCell contentView
[cell.contentView addSubview: self.placeField];
}
Если кому-то интересно: я использовал этот tableView, чтобы пользователь мог создать учетную запись пользователя, и использовал Placeholder для (Имя, Дата рождения, ....), чтобы мне не нужен статический текст. ^^
Скажите, как это работает для вас, или если вам нужны дальнейшие объяснения