Constructors

The following constructors are available globally.

  • Initialize UIEdgeInsets with inset on desired side. UIEdgeInsets(top: 20) == UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0) UIEdgeInsets(top: 20, otherSides: 15) == UIEdgeInsets(top: 20, left: 15, bottom: 15, right: 15)

    Declaration

    Swift

    public init(top: CGFloat? = default, left: CGFloat? = default, bottom: CGFloat? = default, right: CGFloat? = default, otherSides: CGFloat? = default)
  • Initialize UIEdgeInsets with given value for all the sides. UIEdgeInsets(15) == UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15)

    Declaration

    Swift

    public init(_ padding: CGFloat)
  • Initialize UIEdgeInsets with given values for top & bottom, left & right sides. UIEdgeInsets(padding: 15, sidePadding: 16) == UIEdgeInsets(top: 15, left: 16, bottom: 15, right: 16)

    Declaration

    Swift

    public init(padding: CGFloat, sidePadding: CGFloat = default)
  • Empty public initializer.

    Declaration

    Swift

    public init()