小编www*_*com的帖子

自定义UITableViewCells在滚动后重复行

我正在寻找解决方案......

码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    NSString *CellIdentifier = @"ItemCardapio";
    NSString *nibName = @"ItemCardapioCell";

    ItemCardapioCell *cell = (ItemCardapioCell *) [self.restaurantsList dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) { 
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:nibName owner:self options:nil]; 
        cell = (ItemCardapioCell *)[nib objectAtIndex:0];

        [cell initCellWithRestaurant:@"" tipoRestaurante:@""];      
    }

    return cell;
}
Run Code Online (Sandbox Code Playgroud)

iphone uitableview ios

-3
推荐指数
1
解决办法
1295
查看次数

标签 统计

ios ×1

iphone ×1

uitableview ×1