json에서 데이터를 가져옵니다. 그것은 정상적으로 작동하지만 문제는 데이터가 tableView에 표시되지 않는다는 것입니다.데이터가 iPhone 테이블에 표시되지 않습니다.
NSLog를 사용하여 셀에 할당 한 값을 확인했지만 셀에 데이터가 표시되지 않습니다.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
int count = [surveyList count];
NSLog(@"These are rows %d",count);
return [surveyList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
ObjectData *data = [surveyList objectAtIndex:indexPath.row];
NSString *testingClient = data.survey_title;
NSLog(testingClient);
NSString *cellText = testingClient;
return cell;
}
테이블 뷰에 위임자를 할당했는지 확인하십시오. – DivineDesert
예 저는 누군가에게 tableviewrealod 데이터가 문제를 일으키고 있다고 말한 적이 있지만 아무 것도 다시로드하지 않았다고 말했습니다. – user1553768