ボタンがクリックされたときにテーブルビューコントローラーを表示するビューコントローラーがあります。すべてがテーブル ビュー デリゲートで正常に動作し、テーブル ビューは正常に表示されますが、ellForRowAtIndexPath: デリゲート メソッドでは、セルがインスタンス化されて返されますが、正しく表示されません。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"alrededor";
alrededorCell *cell = [tableView
dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[alrededorCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSDictionary *categoria = [[NSDictionary alloc] initWithDictionary: [_categoriasArray objectAtIndex:indexPath.row]];
NSLog(@"categoria %@", categoria);
cell.title.text = [categoria valueForKey:@"title"];
return cell;
}
どうもありがとう