UIImageView

class UIImageView : UIView

This extesion adds some useful functions to UIImageView.

  • Create an UIImageView with the given image and frame

    Declaration

    Swift

    public convenience init(frame: CGRect, image: UIImage)

    Parameters

    frame

    UIImageView frame.

    image

    UIImageView image.

    Return Value

    Returns the created UIImageView.

  • Create an UIImageView with the given image, size and center.

    Declaration

    Swift

    public convenience init(image: UIImage, size: CGSize, center: CGPoint)

    Parameters

    image

    UIImageView image.

    size

    UIImageView size.

    center

    UIImageView center.

    Return Value

    Returns the created UIImageView.

  • Create an UIImageView with the given image and center.

    Declaration

    Swift

    public convenience init(image: UIImage, center: CGPoint)

    Parameters

    image

    UIImageView image.

    center

    UIImageView center.

    Return Value

    Returns the created UIImageView.

  • Create an UIImageView with the given image and center.

    Declaration

    Swift

    public convenience init(imageTemplate: UIImage, tintColor: UIColor)

    Parameters

    imageTemplate

    UIImage template.

    tintColor

    Template color.

    Return Value

    Returns the created UIImageView.

  • Create a drop shadow effect.

    Declaration

    Swift

    public func shadow(color: UIColor, radius: CGFloat, offset: CGSize, opacity: Float)

    Parameters

    color

    Shadow color.

    radius

    Shadow radius.

    offset

    Shadow offset.

    opacity

    Shadow opacity.

  • Mask the current UIImageView with an UIImage.

    Declaration

    Swift

    public func mask(image: UIImage)

    Parameters

    image

    The mask UIImage.