UIView

class UIView : UIResponder, NSCoding, UIAppearance, UIAppearanceContainer, UIDynamicItem, UITraitEnvironment, UICoordinateSpace, UIFocusItem, UIFocusItemContainer, CALayerDelegate
  • Adds a view to the end of the receiver’s list of subviews and then apply autolayout contraints to fit the current view.

    Declaration

    Swift

    public func addAutolayoutSubview(_ view: UIView,
                                     top: CGFloat? = 0.0,
                                     height: CGFloat? = 1.0,
                                     leading: CGFloat? = 0.0,
                                     width: CGFloat? = 1.0)
  • Inserts a view below another view in the view hierarchy and then apply autolayout contraints to fit the current view.

    Declaration

    Swift

    public func insertAutolayoutSubview(_ view: UIView,
                                        belowSubview siblingSubview: UIView,
                                        top: CGFloat? = 0.0,
                                        height: CGFloat? = 1.0,
                                        leading: CGFloat? = 0.0,
                                        width: CGFloat? = 1.0)
  • Inserts a view above another view in the view hierarchy and then apply autolayout contraints to fit the current view.

    Declaration

    Swift

    public func insertAutolayoutSubview(_ view: UIView,
                                        aboveSubview siblingSubview: UIView,
                                        top: CGFloat? = 0.0,
                                        height: CGFloat? = 1.0,
                                        leading: CGFloat? = 0.0,
                                        width: CGFloat? = 1.0)
  • Add gradient colors in sublayer at index 0.

    Declaration

    Swift

    public func addGradient(_ colors: [CGColor])
  • Transform view to fit givent Quad.

    Declaration

    Swift

    public func transformToFit(quad: MUQuad)