缓存UIView对象以提高性能

时间:2022-02-12 03:59:19

Obviously Apple does this with UITableViewCells. I am curious if anyone has tried it with other UIView subclasses. And if so, what was your experience?

显然,苹果是用uitableviewcell做的。我很好奇是否有人用其他UIView子类尝试过。如果是的话,你的经验是什么?

1 个解决方案

#1


2  

HJCache caches and shares UIImage objects in order to make tables with downloaded images scroll smoothly, even on first generation iPhones. Note, it shares UIImage, not UIImageView.

HJCache缓存并共享UIImage对象,以便让下载的图片能够流畅地滚动,即使是在第一代iphone上。注意,它共享UIImage,而不是UIImageView。

http://www.markj.net/hjcache-iphone-image-cache/

http://www.markj.net/hjcache-iphone-image-cache/

#1


2  

HJCache caches and shares UIImage objects in order to make tables with downloaded images scroll smoothly, even on first generation iPhones. Note, it shares UIImage, not UIImageView.

HJCache缓存并共享UIImage对象,以便让下载的图片能够流畅地滚动,即使是在第一代iphone上。注意,它共享UIImage,而不是UIImageView。

http://www.markj.net/hjcache-iphone-image-cache/

http://www.markj.net/hjcache-iphone-image-cache/