ImageStyle

public struct ImageStyle : ViewStyle

Contains the styling customization options for any images.

  • The color of the image’s border.

    Declaration

    Swift

    public var borderColor: UIColor?
  • The width of the image’s border.

    Declaration

    Swift

    public var borderWidth: CGFloat
  • The image’s corner radius.

    Declaration

    Swift

    public var cornerRadius: CGFloat
  • A boolean value that determines whether the image is confined to the bounds of the view.

    Declaration

    Swift

    public var clipsToBounds: Bool
  • A flag used to determine how to lay out the image in its bounds.

    Declaration

    Swift

    public var contentMode: UIView.ContentMode
  • Initializes the image style.

    Declaration

    Swift

    public init(borderColor: UIColor?,
                borderWidth: CGFloat,
                cornerRadius: CGFloat,
                clipsToBounds: Bool,
                contentMode: UIView.ContentMode)

    Parameters

    borderColor

    The color of the image’s border.

    borderWidth

    The width of the image’s border.

    cornerRadius

    The image’s corner radius.

    clipsToBounds

    A boolean value that determines whether the image is confined to the bounds of the view.

    contentMode

    A flag used to determine how to lay out the image in its bounds.