在reloadData上没有调用cellForReloadIndexPath

时间:2012-01-24 00:25:50

标签: ios uitableview ios5

我已阅读其他帖子,似乎无法弄明白。当我滚动到以前未查看的单元格时,会调用cellForRowAtIndexPath,但是当我调用reloadData时,它不会被调用。与数据源一样,Delegate连接到文件所有者。

我的cellForRowAtIndexPath:

-(UITableViewCell *)tableView:(UITableView *)tableView
        cellForRowAtIndexPath:(NSIndexPath *)cellForRowAtIndexPath {
    NSLog(@"cellForRowAtIndexPath");
    static NSString *CellTableIdentifier = @"CellTableIdentifier";

    UINib *nib = [UINib nibWithNibName:@"HBStopDialogCell" bundle:nil];
        [tableView registerNib:nib forCellReuseIdentifier:CellTableIdentifier];

    HBStopDialogCell *cell = [tableView dequeueReusableCellWithIdentifier:CellTableIdentifier];
    NSUInteger row = [cellForRowAtIndexPath row];

    [cell stopName:ourStop.stopName stopLine:[ourStop.normalStopsArray objectAtIndex:row]];
    if (cell==nil) {
        NSLog(@"ah the cell is nil");
    }

    return cell;
}

0 个答案:

没有答案
相关问题