웹에서 JSON 콘텐츠를로드하는 TableView가 있습니다. AFNetworking 및 JSONModel을 사용합니다. 그리고이 튜토리얼을 사용하여 데이터 수신 및 구문 분석을 수행합니다. 다음은 코드입니다.다른보기로 JSON 데이터 전달
- (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;
이것은 JSON과 어떤 관련이 있습니까? –
@HotLicks 콘텐츠를 JSON으로 채 웁니다. –
하지만 JSON에서 나온 콘텐츠와 다른 점은 무엇입니까? 귀하의 문제는 JSON과 관련이없는 것처럼 보입니다. –