Web から JSON コンテンツを読み込む TableView があります。AFNetworking と JSONModel を使用しています。そして、このチュートリアルを使用して、データの受信と解析を行います。コードは次のとおりです。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *identifier = @"CellIdentifier";
__weak ProgramacaoTableCell *cell = (ProgramacaoTableCell *)[self.tableView dequeueReusableCellWithIdentifier:identifier];
ProgramacaoModel* programacao = _programacao.programacaoArray[indexPath.row];
// NameLabel is the Label in the Cell.
cell.nameLabel.text = [NSString stringWithFormat:@"%@", programacao.atracao ];
return cell;
}
このデータを Detail ViewController に渡す方法を知りたいです。私の DetailViewController には、データを受け取るためのプロパティがあります。
@property (nonatomic, strong) IBOutlet UILabel *programacaoNomeLabel;