2014-02-22 4 views
1

테이블에 표시 할 데이터가 작기 때문에 모두로드하고 싶습니다. 아래 코드는 내 코드이며 어떤 이유로 든 아무것도 나타나지 않습니다. 내가 잘못 한 것을 한 번 봐 주시겠습니까? 감사합니다UITableview의 셀에 데이터 입력

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 
NSString *CellIdentifier = [NSString stringWithFormat:@"S%1dR%1d",indexPath.section,indexPath.row]; 

TableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 

if (cell == nil) { 
    cell = [[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 
} 

// Configure the cell... 

long row = [indexPath row]; 

cell.BBname.text = _BBNames [row]; 
cell.BBtype.text = _BBTypes [row]; 
cell.BBimage.image = [UIImage imageNamed:_BBImages [row]]; 

if([self getCheckedForIndex:indexPath.row]==YES) 
{ 
    cell.accessoryType = UITableViewCellAccessoryCheckmark; 
} 

return cell;} 
+1

돈을 사용하지 않는 경우 각 행에 대해 다른 셀 식별자를 만들지 마라 !! 왜 그것을하고 있습니까?? –

+1

또한 ... 행은 NSInteger이며 길지 않습니다. –

답변

1

은 사용자 정의 셀 "TableViewCell"입니까? "있는 UITableViewCell"대신

특별히 구현, 또한 당신의 tableview 위임이 설정되어 있는지 확인합니다 사용자 정의 세포를 사용 초기화

[[NSBundle mainBundle] loadNibNamed: owner: options:] 

에 대한 인터페이스 빌더를 사용하는 경우

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
관련 문제