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