1

Can anyone point me towards an example or tutorial for this? I basically want to save images to the documents folder then have a table that contains them for user review later on.

I've got it working but only when I go and add each image to an array then generate the table with contents of said array first. Is there a quicker or more automated way to do this?

4

2 回答 2

1

这是一个很好的教程,提供了一个你可以适应的项目:

http://www.raywenderlich.com/19788/how-to-use-nsoperations-and-nsoperationqueues

虽然它实际上是关于在辅助线程上进行延迟加载和其他图像操作(保持 UI 响应),但您也可以以这种方式在表格中显示图像。

您将进行的主要修改是首先查找本地存储的图像,然后在不可用时进行网络获取。进一步的改进是检查与每个本地图像一起存储的时间戳,如果有更新的图像可用,则从网络更新。

于 2012-10-09T23:33:40.487 回答
0

没错,您首先准备数据源(即图像数组),然后将其传递给 tableview 并重新加载它。如果您正在处理大量图像,请考虑延迟加载。

苹果在这方面有一个例子

于 2012-10-09T23:17:23.777 回答