【发布时间】:2023-03-16 19:56:01
【问题描述】:
我在我的应用程序中使用自定义 UITableView 单元格,并且我已集成 LazyTableImages 示例代码以在 tableview 中下载图像。我在
- (void)appImageDidLoad:(NSIndexPath *)indexPath
{
IconDownloader *iconDownloader = [imageDownloadsInProgress objectForKey:indexPath];
if (iconDownloader != nil)
{
CustomTblViewCell *cell = (CustomTblViewCell *)[self.TblView cellForRowAtIndexPath:iconDownloader.indexPathInTableView];
// Display the newly loaded image
cell.ImgViewUser.image = iconDownloader.appRecord.m_strImage;
}
// Remove the IconDownloader from the in progress list.
// This will result in it being deallocated.
[imageDownloadsInProgress removeObjectForKey:indexPath];
[m_CtrlTblViewFacetoface reloadData ];
}
上面的代码没有加载任何数据,但是当我使用 UITableView 单元格而不是 Customcell 时,它正在工作,知道吗?
【问题讨论】:
-
“不工作”是什么意思?具体一点。
-
tableview 没有完全空白
-
检查你是否真的在lazyLoading中获取数据...
标签: iphone objective-c ios ipad uitableview