ストーリーボードを使用して、別のへのナビゲーションを行うビューを持つシンプルなアプリを実行UITableView
しています。UITableViewCell
UIView
したがって、テーブルビューのセルにデータを入力するようにコーディングする必要があります。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"SampleCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
NSLog(@"cai no init da cell");
}
GPItem *item = [self.items objectAtIndex:indexPath.row];
cell.textLabel.text = @"Post";
cell.detailTextLabel.text = item.imageURL;
return cell;
}
if (cell == nil) { ...
コードが実行されないことに気付いたので、ストーリーボードのセルを使用して実行する必要がありますか?
ありがとう。