ADPhotoKit Documentation

Extensions on UIImageView

Methods

set​Asset(_:​size:​placeholder:​progress:​completion​Handler:​)

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

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.

completion​Handler ((UIImage?) -> Void)?

Called after fetch result.

set​Video​Url​Asset(_:​)

public func setVideoUrlAsset(_ url: URL)  

Sets an image to imageView with video url.

Parameters

url URL

Video url.