在iOS应用程序中管理Facebook朋友的最佳做法 [英] Best practices for managing facebook friends pics in iOS App

查看:179
本文介绍了在iOS应用程序中管理Facebook朋友的最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个包含Facebook朋友列表的桌面的iOS应用程序,我想管理此列表以进行滚动性能。



我不想在每次用户打开该朋友列表视图时加载图像,并且该图像可以在本地保存,但同时不会一个很好的做法,因为用户可以在我们已经将旧的文件系统保存到文件系统后更改他们的个人资料图片。



所以我只是想知道什么是最好的方法来管理这个? p>

另外我还能如何以最优化的尺寸获得这些图像?



提前感谢

解决方案

您可能可以在AFNetworking中的UIImageView类中使用setImageWithURL:placeholderImage来加载占位符(或现有映像),然后请求最新的映像这将在获取时获得更新。



文档在这里:



http://afnetworking.org/Documentation/Categories/UIImageView+AFNetworking.html



项目在这里:



https:// github.com/AFNetworking/AFNetworking/



UIImageView应该调整图像大小。


i'm working on an iOS app which has a tableview containing facebook friends' list, I want to manage this list for scrolling performance.

i don't want to load the images each time user open that friend list view, and for that images can be saved locally but at the same time it would not be a good practice as users can change their profile pictures after we already saved older ones to file system.

So i just wondering what is the best way to manage this?

Also how can i get those images in best possible optimized size?

thanks in advance

解决方案

You might be able to use setImageWithURL:placeholderImage: in the UIImageView class in AFNetworking to load a placeholder (or existing image) and then request the latest image which will get updated when fetched.

The docs are here:

http://afnetworking.org/Documentation/Categories/UIImageView+AFNetworking.html

The project is here:

https://github.com/AFNetworking/AFNetworking/

UIImageView should take care of resizing the images.

这篇关于在iOS应用程序中管理Facebook朋友的最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆