Skip to content

UIImageView

duzexu edited this page Jun 2, 2021 · 2 revisions

Extensions on UIImageView

Methods

setAsset(_:size:placeholder:progress:completionHandler:)

Sets an image to imageView with PHAsset.

public func setAsset(_ asset: PHAsset,
                  size: CGSize? = nil,
                  placeholder: UIImage? = nil,
                  progress: ((Double) -> Void)? = nil,
                  completionHandler: ((UIImage?) -> Void)? = nil) 

Parameters

  • asset: Asset to fetch image.
  • size: Size of fetch image.
  • placeholder: A placeholder to show while retrieving the image from asset.
  • progress: Progress of fetching request.
  • completionHandler: Called after fetch result.

setVideoUrlAsset(_:)

Sets an image to imageView with video url.

public func setVideoUrlAsset(_ url: URL) 

Parameters

  • url: Video url.
Types
Protocols
Global Typealiases
Operators
Extensions
Clone this wiki locally