UIImageView

  • SwifterSwift: Set image from a URL.

    Declaration

    Swift

    public func download(
    	from url: URL,
    	contentMode: UIViewContentMode = .scaleAspectFit,
    	placeholder: UIImage? = nil,
    	completionHandler: ((UIImage?) -> Void)? = nil)

    Parameters

    url

    URL of image.

    contentMode

    imageView content mode (default is .scaleAspectFit).

    placeHolder

    optional placeholder image

    completionHandler

    optional completion handler to run when download finishs (default is nil).

  • SwifterSwift: Make image view blurry

    Declaration

    Swift

    public func blur(withStyle style: UIBlurEffectStyle = .light)

    Parameters

    style

    UIBlurEffectStyle (default is .light).

  • SwifterSwift: Blurred version of an image view

    Declaration

    Swift

    public func blurred(withStyle style: UIBlurEffectStyle = .light) -> UIImageView

    Parameters

    style

    UIBlurEffectStyle (default is .light).

    Return Value

    blurred version of self.