У меня есть UITableViewController
и UITableViewCell
. Эта ячейка содержит три текстовых поля. Каждое текстовое поле имеет тег. Ячейка создается следующим образом.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"reuseMyCell";
cell = (TimeInserTableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"TimeInsertCell" owner:self options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[TimeInserTableViewCell class]]){
cell = (TimeInserTableViewCell *) currentObject;
if ([cell.reuseIdentifier isEqualToString: CellIdentifier]) {
break;
}
}
}
}
cell.taskNameField.delegate=self;
cell.startTime.delegate=self;
cell.endTime.delegate=self;
return cell;
}
Моя проблема заключается в следующем: при вводе текста в первое текстовое поле и прокрутке текст предыдущего текстового поля заменяется и в других ячейках.