UIEdgeInsets

struct UIEdgeInsets
  • SwifterSwift: Return the vertical insets. The vertical insets is composed by top + bottom.

    Declaration

    Swift

    var vertical: CGFloat { get }
  • SwifterSwift: Return the horizontal insets. The horizontal insets is composed by left + right.

    Declaration

    Swift

    var horizontal: CGFloat { get }
  • SwifterSwift: Creates an UIEdgeInsets with the inset value applied to all (top, bottom, right, left)

    Declaration

    Swift

    init(inset: CGFloat)

    Parameters

    inset

    Inset to be applied in all the edges.

  • SwifterSwift: Creates an UIEdgeInsets with the horizontal value equally divided and applied to right and left. And the vertical value equally divided and applied to top and bottom.

    Declaration

    Swift

    init(horizontal: CGFloat, vertical: CGFloat)

    Parameters

    horizontal

    Inset to be applied to right and left.

    vertical

    Inset to be applied to top and bottom.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and top offset.

    Declaration

    Swift

    func insetBy(top: CGFloat) -> UIEdgeInsets

    Parameters

    top

    Offset to be applied in to the top edge.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and left offset.

    Declaration

    Swift

    func insetBy(left: CGFloat) -> UIEdgeInsets

    Parameters

    left

    Offset to be applied in to the left edge.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and bottom offset.

    Declaration

    Swift

    func insetBy(bottom: CGFloat) -> UIEdgeInsets

    Parameters

    bottom

    Offset to be applied in to the bottom edge.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and right offset.

    Declaration

    Swift

    func insetBy(right: CGFloat) -> UIEdgeInsets

    Parameters

    right

    Offset to be applied in to the right edge.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and horizontal value equally divided and applied to right offset and left offset.

    Declaration

    Swift

    func insetBy(horizontal: CGFloat) -> UIEdgeInsets

    Parameters

    horizontal

    Offset to be applied to right and left.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Creates an UIEdgeInsets based on current value and vertical value equally divided and applied to top and bottom.

    Declaration

    Swift

    func insetBy(vertical: CGFloat) -> UIEdgeInsets

    Parameters

    vertical

    Offset to be applied to top and bottom.

    Return Value

    UIEdgeInsets offset with given offset.

  • SwifterSwift: Add all the properties of two UIEdgeInsets to create their addition.

    Declaration

    Swift

    static func + (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets

    Parameters

    lhs

    The left-hand expression

    rhs

    The right-hand expression

    Return Value

    A new UIEdgeInsets instance where the values of lhs and rhs are added together.

  • SwifterSwift: Add all the properties of two UIEdgeInsets to the left-hand instance.

    Declaration

    Swift

    static func += (lhs: inout UIEdgeInsets, rhs: UIEdgeInsets)

    Parameters

    lhs

    The left-hand expression to be mutated

    rhs

    The right-hand expression