2012-01-13 5 views
0

나는 왜 내가 EXC_BAD_ACCESS를 얻는 지 이해할 수 없다. NSArray *topLevelObjects을 할당한다. 똑같은 코드와 다른 BlogCell을 다른 tabliView에서 사용하고 있기 때문에 미친 짓이야. 완벽하게 작동하고있어!cellForRowAtIndexPath에서 매우 이상한 문제

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    int r = indexPath.row; 
    static NSString *CellIdentifier = @"Blog"; 
    BlogCell *cell = (BlogCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 

    if (cell == nil) { 

     NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"BlogCell" owner:self options:nil]; 
     cell = [topLevelObjects objectAtIndex:0]; 
    }   

    return cell; 
} 

답변

0

BlogCell에서 FilesOwner로 지정하는 모든 콘센트가이 클래스에 해당 IBOutlet을 가지고 있는지 확인하십시오.

+0

모든 콘센트가 연결되지만 UITableViewCell에는 연결되지만 FilesOwner에는 연결되지 않습니다. 그리고 그것은 다른 tableView에서도 완벽하게 작동합니다. – Abramodj

관련 문제