BorderView

public class BorderView : UIView

Represents a UIView that is used to create a border to another view.

You can obtain a BorderView by using add(top/bottom/left/right:, offsets:, useConstraints:) functions. But the only changes you are expected to do with it are: hide or show it, change its color, its alpha or other properties.

Warning

You are not supposed to change or use constraints with this view, that has already been handled for you.
  • Positions where a BorderView may appear.

    Seealso

    BorderPosition.

    Declaration

    Swift

    public let position: BorderPosition
  • Initializer for BorderView, without specifying a frame.

    Declaration

    Swift

    internal convenience init(position: BorderPosition)

    Parameters

    position

    the position of the BorderView.

  • Initializer for BorderView.

    Declaration

    Swift

    internal init(frame: CGRect, position: BorderPosition)

    Parameters

    position

    the position of the BorderView.

    frame

    the desired frame of the BorderView.

  • This override throws a fatalError when trying to create a BorderView while only specifying a frame.

    Declaration

    Swift

    override public init(frame: CGRect)
  • This override throws a fatalError when trying to create a BorderView while only specifying a NSCoder.

    Warning

    Initializing an object with data from an unarchiver has not been implemented.

    Declaration

    Swift

    required public init(coder: NSCoder)
  • If the BorderView has the rounded corners properties, this method sets ClipsToBounds to true.

    Declaration

    Swift

    func clipToBoundsBordersIfNeeded(border: BorderViewProperties)

    Parameters

    border

    the properties of the BorderView. For more details see BorderViewProperties.