0

I want to use code from Apple's lazyTableImages sample project to realize async (non-blocking) loading of images (UIImage) from URL addresses.

I already have URL addresses for the images to be downloaded, so the ParseOperation.h and ParseOperation.m in the lazyTableImages sample project is not necessary.

However, I failed to apply the sample code into my project. I've got no idea on how to manually set images URLs, instead of parsing the XML to get URL addresses in the sample project.

Please shed some light on it. Thank you :D

4

3 回答 3

2

您可以在项目的 RootViewController.m 中将 URL 字符串设置为 appRecord 的 imageURLStrin

IE

appRecord.imageURLString = YOUR URL STRING 
于 2013-05-16T02:51:19.077 回答
1

在 Apple 的lazyTableImages 示例项目中,对象AppRecord是在内部创建的,ParseOperation.m并且它被添加到一个名为appRecordList. 然后将该数组分配给 RootViewController 中存在的数组entries。相反,在这里您可以做的是,您可以AppRecord在 RootViewController 的 viewDidLoad 方法中创建对象,并将图像 URL 设置为WilsonL告诉 appRecord 对象,然后将其添加到entries数组中。

这将起作用。

于 2013-05-16T04:11:20.540 回答
1

如果要显示来自 url 的图像,请使用 EGOImage。

EGOImageLoading

于 2013-05-16T06:27:57.100 回答