UIImageView
class UIImageView : UIView
-
Set image with url.
Declaration
Swift
public func sf_setImage(url: String, placeholder: UIImage? = nil, queryPolicy: CacheQueryPolicy = .Normal, options: [Option]? = nil, done: ((UIImage?, NSError?) -> Void)? = nil)
Parameters
url
Image url.
placeholder
Placeholder image.
queryPolicy
Query policy, see
CacheQueryPolicy
.options
Options to edit image, see
Option
.done
Callback when done.
-
Cancel current download task.
Declaration
Swift
public func sf_cancelDownload()
-
Use a custom image loader.
Declaration
Swift
public func sf_setAnimationLoader<T: UIView where T: LoadingAnimator>(loaderView: T)
Parameters
loaderView
Custom loader view, it must conform protocol
LoadingAnimator
.