EdgeInsets

public extension EdgeInsets
  • 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 }

Methods

  • SwifterSwift: Creates an EdgeInsets 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 EdgeInsets 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 EdgeInsets based on current value and top offset.

    Declaration

    Swift

    func insetBy(top: CGFloat) -> EdgeInsets

    Parameters

    top

    Offset to be applied in to the top edge.

    Return Value

    EdgeInsets offset with given offset.

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

    Declaration

    Swift

    func insetBy(left: CGFloat) -> EdgeInsets

    Parameters

    left

    Offset to be applied in to the left edge.

    Return Value

    EdgeInsets offset with given offset.

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

    Declaration

    Swift

    func insetBy(bottom: CGFloat) -> EdgeInsets

    Parameters

    bottom

    Offset to be applied in to the bottom edge.

    Return Value

    EdgeInsets offset with given offset.

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

    Declaration

    Swift

    func insetBy(right: CGFloat) -> EdgeInsets

    Parameters

    right

    Offset to be applied in to the right edge.

    Return Value

    EdgeInsets offset with given offset.

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

    Declaration

    Swift

    func insetBy(horizontal: CGFloat) -> EdgeInsets

    Parameters

    horizontal

    Offset to be applied to right and left.

    Return Value

    EdgeInsets offset with given offset.

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

    Declaration

    Swift

    func insetBy(vertical: CGFloat) -> EdgeInsets

    Parameters

    vertical

    Offset to be applied to top and bottom.

    Return Value

    EdgeInsets offset with given offset.

Operators

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

    Declaration

    Swift

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

    Parameters

    lhs

    The left-hand expression

    rhs

    The right-hand expression

    Return Value

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

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

    Declaration

    Swift

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

    Parameters

    lhs

    The left-hand expression to be mutated

    rhs

    The right-hand expression