从我的Web服务缓存图像URL的最佳方法? [英] best way to cache image url from my webservice?

查看:67
本文介绍了从我的Web服务缓存图像URL的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经以ARC格式实现了一个应用程序。但我想在library的缓存文件夹中缓存一些图像url。
有什么想法吗?



预先感谢。

解决方案

我希望它能为您提供帮助。我在所有项目中都使用 SDWebImage



使用:



添加您的viewcontroller: #import UIImageView + WebCache.h

  [yourImageView setImageWithURL:[NSURL URLWithString:@ ImageUrl]]; 

您需要将MapKit和ImageIO添加到项目中。如果您没有添加



要这样做:


  1. 单击项目导航器顶部的Xcode项目。


  2. 选择构建阶段标签。


  3. 打开使用库链接二进制文件框。


  4. 单击 +。

  5. 添加MapKit和ImageIO框架。


i have implement one application in ARC format. but i want to cache some image url(s) in cache folder of library . any idea?

thanks in advance.

解决方案

I hope it's can help you. I use SDWebImage with my all projects.

using :

add your viewcontroller : #import "UIImageView+WebCache.h"

[yourImageView setImageWithURL:[NSURL URLWithString:@"ImageUrl"]];

you need to add MapKit and ImageIO to the project. if you didn't add

To do that:

  1. Click on the project at the top of the project navigator in Xcode

  2. Select the 'Build Phases' tab.

  3. Open up the 'Link Binary with Libraries' box.

  4. Click the '+'.
  5. Add MapKit and ImageIO frameworks.

这篇关于从我的Web服务缓存图像URL的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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