UIImageView
public extension UIImageView
-
SwifterSwift: Set image from a URL.
Declaration
Swift
func download( from url: URL, contentMode: UIView.ContentMode = .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
func blur(withStyle style: UIBlurEffect.Style = .light)
Parameters
style
UIBlurEffectStyle (default is .light).
-
SwifterSwift: Blurred version of an image view
Declaration
Swift
func blurred(withStyle style: UIBlurEffect.Style = .light) -> UIImageView
Parameters
style
UIBlurEffectStyle (default is .light).
Return Value
blurred version of self.