UIImageView(TuSDKNetworkAdditions) Category Reference
Declared in | UIImageView+TuSDKNetworkAdditions.h |
---|
+ setDefaultEngine:
设置默认网络连接引擎
+ (void)setDefaultEngine:(TuSDKNetworkEngine *)engine
Parameters
engine |
网络连接引擎 |
---|
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_imageURL
Get the current image URL.
- (NSURL *)lsq_imageURL
Discussion
Note that because of the limitations of categories this property can get out of sync if you use lsq_setImage: directly.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:
Set the imageView image
with an url
.
- (void)lsq_setImageWithURL:(NSURL *)url
Parameters
url |
The url for the image. |
---|
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:placeholderImage:
Set the imageView image
with an url
and a placeholder.
- (void)lsq_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
Parameters
url |
The url for the image. |
---|---|
placeholder |
The image to be set initially, until the image request finishes. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:placeholderImage:options:
Set the imageView image
with an url
, placeholder and custom options.
- (void)lsq_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(TuSDKWebImageOptions)options
Parameters
url |
The url for the image. |
---|---|
placeholder |
The image to be set initially, until the image request finishes. |
options |
The options to use when downloading the image. @see TuSDKWebImageOptions for the possible values. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:completed:
Set the imageView image
with an url
.
- (void)lsq_setImageWithURL:(NSURL *)url completed:(TuSDKWebImageCompletionBlock)completedBlock
Parameters
url |
The url for the image. |
---|---|
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. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:placeholderImage:completed:
Set the imageView image
with an url
, placeholder.
- (void)lsq_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(TuSDKWebImageCompletionBlock)completedBlock
Parameters
url |
The url for the image. |
---|---|
placeholder |
The image to be set initially, until the image request finishes. |
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. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:placeholderImage:options:completed:
Set the imageView image
with an url
, placeholder and custom options.
- (void)lsq_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(TuSDKWebImageOptions)options completed:(TuSDKWebImageCompletionBlock)completedBlock
Parameters
url |
The url for the image. |
---|---|
placeholder |
The image to be set initially, until the image request finishes. |
options |
The options to use when downloading the image. @see TuSDKWebImageOptions for the possible values. |
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. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_setImageWithURL:placeholderImage:options:progress:completed:
Set the imageView image
with an url
, placeholder and custom options.
- (void)lsq_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(TuSDKWebImageOptions)options progress:(LSQNKProgressBlock)progressBlock completed:(TuSDKWebImageCompletionBlock)completedBlock
Parameters
url |
The url for the image. |
---|---|
placeholder |
The image to be set initially, until the image request finishes. |
options |
The options to use when downloading the image. @see TuSDKWebImageOptions for the possible values. |
progressBlock |
A block called while image is downloading |
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. |
Discussion
The download is asynchronous and cached.
Declared In
UIImageView+TuSDKNetworkAdditions.h
– lsq_cancelCurrentImageLoad
Cancel the current download
- (void)lsq_cancelCurrentImageLoad
Declared In
UIImageView+TuSDKNetworkAdditions.h