1
私はUITableViewController
とUITableViewCell
です。このセルには3つのテキストフィールドがあります。各テキストフィールドにはタグがあります。セルは次のように作成されます。カスタムUITableViewCellはUITableViewで再利用されませんか?
- (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;
}
私の問題は以下の通りです:私は、最初のテキストフィールドにテキストを入力し、私は、以前のテキストフィールドのテキストがあまりにも他のセルに交換されたときにスクロールします。