NSDirectionalEdgeInsets

extension NSDirectionalEdgeInsets
  • Sum of top and bottom insets

    Declaration

    Swift

    public var vertical: CGFloat { get }
  • Sum of leading and trailing insets

    Declaration

    Swift

    public var horizontal: CGFloat { get }
  • Creates edge insets with the same value on all four sides.

    Declaration

    Swift

    init(all value: CGFloat)

    Parameters

    value

    amount to inset (positive) all four edges. Values can be negative to ‘outset’

  • Creates edge insets with one value for vertical edges and another value for horizontal edges.

    Declaration

    Swift

    init(topAndBottom vertical: CGFloat, leadingAndTrailing horizontal: CGFloat = 0)

    Parameters

    vertical

    amount to inset (positive) top and bottom. Values can be negative to ‘outset’

    horizontal

    amount to inset (positive) leading and trailing. Values can be negative to ‘outset’ (defaults to 0)

  • Creates edge insets with the same value on horizontal edges (and 0 for vertical edges)

    Declaration

    Swift

    init(leadingAndTrailing horizontal: CGFloat)

    Parameters

    horizontal

    amount to inset (positive) leading and trailing. Values can be negative to ‘outset’