2012-01-13 34 views
0

なぜ私はNSArray *topLevelObjectsを割り当てる行に "EXC_BAD_ACCESS"が表示されるのか理解できません。同じコードと同じ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

あなたはFilesOwnerにBlogCellで指定したすべてのコンセントは、このクラスでIBOutletsに対応していることを確認します。

+0

すべてのコンセントは接続されていますが、UITableViewCellではなく、FilesOwnerに接続されています。そして、それは他のtableViewで完全に動作します – Abramodj

関連する問題