/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDWebImageCompat.h"
#import "SDWebImageManager.h"
/**
* Integrates SDWebImage async downloading and caching of remote images with UIButtonView.
*/
@interface UIButton (WebCache)
/**
* Get the current image URL.
*/
- (NSURL *)sd_currentImageURL;
/**
* Get the image URL for a control state.
*
* @param state Which state you want to know the URL for. The values are described in UIControlState.
*/
- (NSURL *)sd_imageURLForState:(UIControlState)state;
/**
* Set the imageView `image` with an `url`.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state;
/**
* Set the imageView `image` with an `url` and a placeholder.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @see sd_setImageWithURL:placeholderImage:options:
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder;
/**
* Set the imageView `image` with an `url`, placeholder and custom options.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
/**
* Set the imageView `image` with an `url`.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param completedBlock A block called when operation has been completed. This block has no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache or from the network.
* The fourth parameter is the original image url.
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock;
/**
* Set the imageView `image` with an `url`, placeholder.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @param completedBlock A block called when operation has been completed. This block has no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache or from the network.
* The fourth parameter is the original image url.
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock;
/**
* Set the imageView `image` with an `url`, placeholder and custom options.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
* @param completedBlock A block called when operation has been completed. This block has no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache or from the network.
* The fourth parameter is the original image url.
*/
- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock;
/**
* Set the backgroundImageView `image` with an `url`.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
*/
- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state;
/**
* Set the backgroundImageView `image` with an `url` and a placeholder.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @see sd_setImageWithURL:placeholderImage:options:
*/
- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder;
/**
* Set the backgroundImageView `image` with an `url`, placeholder and custom options.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param placeholder The image to be set initially, until the image request finishes.
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
*/
- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
/**
* Set the backgroundImageView `image` with an `url`.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the specified title. The values are described in UIControlState.
* @param completedBlock A block called when operation has been completed. This block has no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache or from the network.
* The fourth parameter is the original image url.
*/
- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock;
/**
* Set the backgroundImageView `image` with an `url`, placeholder.
*
* The download is asynchronous and cached.
*
* @param url The url for the image.
* @param state The state that uses the s
没有合适的资源?快使用搜索试试~ 我知道了~
ios SDWebimage Demo
共54个文件
m:20个
h:20个
png:3个
4星 · 超过85%的资源 需积分: 10 86 下载量 6 浏览量
2015-04-22
23:12:21
上传
评论 2
收藏 2.86MB ZIP 举报
温馨提示
http://blog.csdn.net/robinson_911/article/details/45203877
资源推荐
资源详情
资源评论
收起资源包目录
SDWebimageDemo.zip (54个子文件)
SDWebimageDemo
Examples
CustomPathImages
4ad9ae8eabfec60b40bf48f0bfc2d120 2.74MB
SDWebImage Demo.xcodeproj
project.xcworkspace
contents.xcworkspacedata 160B
xcuserdata
yuwang.xcuserdatad
UserInterfaceState.xcuserstate 35KB
project.pbxproj 28KB
xcuserdata
yuwang.xcuserdatad
xcschemes
xcschememanagement.plist 487B
SDWebImage Demo.xcscheme 3KB
Default-568h@2x.png 18KB
.DS_Store 6KB
SDWebImage Demo
placeholder@2x.png 6KB
main.m 349B
MasterViewController.m 6KB
SDWebImage Demo-Info.plist 1KB
DetailViewController.h 352B
AppDelegate.h 367B
AppDelegate.m 3KB
SDWebImage Demo-Prefix.pch 333B
DetailViewController.m 2KB
MasterViewController.h 350B
placeholder.png 3KB
en.lproj
DetailViewController.xib 7KB
MasterViewController.xib 6KB
SDWebImage
SDWebImageDownloaderOperation.m 18KB
UIImage+GIF.h 382B
MKAnnotationView+WebCache.h 6KB
UIImage+WebP.h 490B
SDWebImageDownloader.h 7KB
UIView+WebCacheOperation.m 2KB
SDImageCache.h 8KB
SDWebImageCompat.h 2KB
UIView+WebCacheOperation.h 970B
SDWebImageManager.m 14KB
SDWebImageCompat.m 2KB
SDWebImagePrefetcher.m 5KB
UIImage+GIF.m 5KB
SDWebImagePrefetcher.h 4KB
UIButton+WebCache.h 13KB
UIImageView+WebCache.h 10KB
SDWebImageDecoder.m 3KB
UIImage+MultiFormat.h 263B
UIImage+MultiFormat.m 3KB
UIImage+WebP.m 2KB
SDWebImageManager.h 11KB
SDWebImageDownloader.m 11KB
SDWebImageDecoder.h 453B
UIButton+WebCache.m 12KB
UIImageView+WebCache.m 8KB
SDImageCache.m 19KB
NSData+ImageContentType.h 565B
MKAnnotationView+WebCache.m 5KB
NSData+ImageContentType.m 1KB
UIImageView+HighlightedWebCache.m 5KB
SDWebImageOperation.h 329B
UIImageView+HighlightedWebCache.h 5KB
SDWebImageDownloaderOperation.h 3KB
共 54 条
- 1
水桶前辈
- 粉丝: 3211
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页