2015-10-18 135 views
2

我已经在UITableViewController中设置了单个单元格,单元格自定义单元格以显示比屏幕更长的视图。然而,在测试时,我注意到在离开视图区域之前向下滚动时单元格会消失(变空白)。这不是什么幻想,但我不明白为什么它会在滚动时消失,特别是当它远离可视区域时。滚动时UITableView单元格变空白

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

VendorDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"VendorDetailCell"]; 
cell.vendorImage.image = [UIImage imageWithData: self.imageData.data]; 
cell.vendorTitle.text = self.imageData.vendorTitle; 
cell.vendorDescription.text = self.imageData.vendorDescription; 



    return cell; 
} 
+0

你必须分配的情况下,'的tableView dequeueReusableCellWithIdentifier细胞:'不通过检查'如果(细胞==零)'那么你就必须分配您的自定义单元格返回一个细胞,我相信:) – ErickES7

回答

2

当滚动在表格视图中的小区的帧因此它的表视图的帧以外会发生这种情况。

  • 您是否实施tableView:heightForRowAtIndexPath:

  • 那高度就是细胞的高度吗?

  • 请问细胞得到更好的服务为被分成几个单元表视图的一个部分 ?

相关问题