Extensions on
UIImageView
Methods
setAsset(_:size:placeholder:progress:completionHandler:)
public func setAsset(_ asset: PHAsset,
size: CGSize? = nil,
placeholder: UIImage? = nil,
progress: ((Double) -> Void)? = nil,
completionHandler: ((UIImage?) -> Void)? = nil)
Sets an image to imageView with PHAsset
.
Parameters
Name | Type | Description |
---|---|---|
asset | PHAsset |
Asset to fetch image. |
size | CGSize? |
Size of fetch image. |
placeholder | UIImage? |
A placeholder to show while retrieving the image from asset. |
progress | ((Double) -> Void)? |
Progress of fetching request. |
completionHandler | ((UIImage?) -> Void)? |
Called after fetch result. |
setVideoUrlAsset(_:)
public func setVideoUrlAsset(_ url: URL)
Sets an image to imageView with video url.
Parameters
Name | Type | Description |
---|---|---|
url | URL |
Video url. |