私はObjective CとiOSが初めてです。ビュー コントローラーのナビゲーション コントローラーをストーリーボードに埋め込みました。次に、ルート ビュー コントローラーである別のビュー コントローラーをストーリーボードに追加しました。テーブルビューが追加された別のView Controllerに接続するボタンがあります。ビルドを実行すると、次の例外が発生します。実装ファイルのコードは次のとおりです (関連するメソッドのみ)。さらにコードを提供する必要があるかどうか教えてください。
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [contacts count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"RecipeCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text = [contacts objectAtIndex:indexPath.row];
return cell;
}