Ios HttpConnection、UITableView和RunLoops以及从磁盘加载
我正在将图像加载到表视图的大网格中。它们来自网络,但下载后会缓存到磁盘 我用这个:Ios HttpConnection、UITableView和RunLoops以及从磁盘加载,ios,uitableview,asynchronous,scroll,nsrunloop,Ios,Uitableview,Asynchronous,Scroll,Nsrunloop,我正在将图像加载到表视图的大网格中。它们来自网络,但下载后会缓存到磁盘 我用这个: [_httpConnection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; 以确保它们在我仍在滚动时加载到视图中。很好 然而,当我再次访问它们时,它们是从磁盘加载的-我没有使用相同的ScheduleInRunload方法。。。也许吧,但我不知道它在哪里 有人有什么想法吗 谢谢,我找到了答案 我可以使用以
[_httpConnection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
以确保它们在我仍在滚动时加载到视图中。很好
然而,当我再次访问它们时,它们是从磁盘加载的-我没有使用相同的ScheduleInRunload方法。。。也许吧,但我不知道它在哪里
有人有什么想法吗
谢谢,我找到了答案
我可以使用以下模式分派选择器:
[self performSelector:@selector(imageReadyToDeliver) withObject:nil afterDelay:0];
我可以用
[self performSelector:@selector(imageReadyToDeliver) withObject:nil afterDelay:0 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];