매우 이상한 문제입니다. 나는 스토리 보드 사용자 정의 셀 양식 UITableViewController 있습니다. 어떤 이유로 셀이 내 TableView에 표시되지 않습니다. 일부 중단 점과 일부 로그 메시지를 넣었고 데이터를 가져올 수 있다고 말하면 셀에 메모리 주소가 있다는 것을 알 수 있습니다. 나는 그 밖의 무엇을 확인해야할지 모르겠습니다.UITableViewCell이 할당되었지만 표시되지 않습니다.
일부 이유 때문에 UPDATE 셀의 숨김 속성이 YES로 설정되어 있으므로 cell.hidden = NO를 추가했지만 여전히 나타나지 않습니다.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier;
if(indexPath.section == 0) {
CellIdentifier = @"HeaderCell";
} else {
CellIdentifier = @"ConnectedGoalCell";
}
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if(indexPath.section == 0) {
//Section 0 Formatting.....displays OK
} else {
//This is the cell that doesn't appear in the tableView
UILabel * nameLabel = (UILabel*)[cell viewWithTag:10];
UILabel * dateLabel = (UILabel*)[cell viewWithTag:11];
NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
formatter.timeZone = [NSTimeZone defaultTimeZone];
[formatter setDateFormat:@"MM/dd/yyyy"];
Goal * goal = [connectedGoals objectAtIndex:indexPath.row];
nameLabel.text = goal.name;
dateLabel.text = [formatter stringFromDate:goal.goal_date];
//Log said that cell HIDDEN was YES. Changed to no here but still no effect
//<UITableViewCell: 0xa288e30; frame = (0 389; 320 44); autoresize = W; layer = <CALayer: 0xa292a80>
cell.hidden = NO;
NSLog(@"CELL TYPE : %@ AT %@", indexPath, CellIdentifier);
//Logs:: CELL TYPE : <NSIndexPath 0xc3917d0> 2 indexes [1, 0] AT ConnectedGoalCell
NSLog(@"%@", cell);
//Logs:: CELL TYPE : <UITableViewCell: 0xc195ba0; frame = (0 389; 320 44); hidden = YES; autoresize = W; layer = <CALayer: 0xc171620>
}
return cell;
}
'ConnectedGoalCell'의 숨겨진 속성을 확인하십시오. 그것은 숨겨져 있습니다. – Ilanchezhian
내 질문이 업데이트되었습니다. 감사합니다. 분명히 관련이 있지만 내 문제를 해결하지 않는 것. – ChickensDontClap