OGeek|极客世界-中国程序员成长平台

标题: ios - UITableView 单元格在滚动时变为空白 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:27
标题: ios - UITableView 单元格在滚动时变为空白

我在 UITableViewController 中设置了一个单节、单单元格自定义单元格,以显示比屏幕长的 View 。但是,在测试时,我注意到单元格在离开 View 区域之前向下滚动时会消失(变为空白)。这没什么花哨的,但我不明白为什么它会在向下滚动时消失,尤其是当它离可视区域不远时。

- (UITableViewCell *)tableViewUITableView *)tableView cellForRowAtIndexPathNSIndexPath *)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;
}



Best Answer-推荐答案


当表格 View 中的单元格框架滚动到表格 View 框架之外时,可能会发生这种情况。

关于ios - UITableView 单元格在滚动时变为空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33199583/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4