我在 iOS 项目中使用 UItableView,它工作正常,但是当我打开语音时它崩溃了,似乎这段代码返回了一个空单元格。你看到我的代码有什么问题吗:
-(UITableViewCell*) cellForIndexPath:(NSIndexPath*) indexPath inTableView:(UITableView*) tableView {
    static NSString *CellIdentifier = @"TocCellView";
    UITableViewCell* cell =(UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        // Use apple technic explained here : http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html
        [[NSBundle mainBundle] loadNibNamed:@"TocCellView" owner:self options:nil];
        cell = self.tableViewCell;
        cell.layer.masksToBounds = YES;
    }
    if ([GraphicHelper isiPad]) {
        [self fillIPadCell:cell withBookPage:[self pageCorrespondingToIndex:indexPath] section:indexPath.section];
    }
    else {
        BOOL isEvenCell = (indexPath.row%2);
        BOOL isEvenHeader = (indexPath.section%2);
        [self fillIPhoneCell:cell withBookPage:[self pageCorrespondingToIndex:indexPath] forEvenCell:isEvenCell inEvenHeader:isEvenHeader];        
    }
    return cell;
}