テーブルにセルを入力して画面に表示する必要があるプロジェクトに取り組んでいます。表示するテーブルがありますが、データがセルに表示されています。ブレークポイントを使用してみましたが、このメソッドが呼び出されないことがわかりました。その直前のメソッド(numberOfRowsInSection)が呼び出されます。助言がありますか?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Resident *aResident = (Resident *)[appDelegate.residents objectAtIndex:indexPath.row];
cell.textLabel.text = aResident.name;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}