UIStackView

class UIStackView : UIView
  • Mechanica

    Adds a background color.

    Declaration

    Swift

    @discardableResult
    func addBackgroundColor(_ color: UIColor) -> UIView

    Parameters

    color

    The view’s background color.

    Return Value

    The UIView used to apply the background color.

  • Mechanica

    Adds a foreground color.

    Declaration

    Swift

    @discardableResult
    func addForegroundColor(_ color: UIColor) -> UIView

    Parameters

    color

    The view’s foreground color.

    Return Value

    The UIView used to apply the foreground color.

  • Mechanica

    Adds a new unarranged subview.

    Declaration

    Swift

    @discardableResult
    func addUnarrangedView(color: UIColor, cornerRadius: CGFloat = 0, at index: Int = 0) -> UIView

    Parameters

    color

    The view’s background color.

    cornerRadius

    The radius used to draw rounded corners.

    index

    The index in the array of the subviews property at which to insert the view.

    Return Value

    The inserted view.