SplitView

open class SplitView : UIView

Resizable Split View, inspired by Apple’s Split View for iPadOS and SplitKit

  • The list of views split by the split view.

    Declaration

    Swift

    public var splitSubviews: [UIView] { get }
  • The handles between views

    Declaration

    Swift

    public var handles: [SplitViewHandle]
  • The minimum width/height ratio for each view

    The default is 0.0

    Declaration

    Swift

    public var minimumRatio: CGFloat { get set }
  • The animation duration when resizing views

    If you specify a negative value or 0, the changes are made without animating them. The default is 0.0 seconds

    Declaration

    Swift

    public var animationDuration: TimeInterval
  • The precision of the movements. 1 is every 10%, 2 is every 1%, etc

    The default is 5

    Declaration

    Swift

    public var precision: Int
  • Snap Behavior

    Declaration

    Swift

    public var snap: [SplitViewSnapBehavior] { get set }
  • The axis along which the split views are laid out.

    This property determines the orientation of the split views. Assigning the NSLayoutConstraint.Axis.vertical value creates a column of views. Assigning the NSLayoutConstraint.Axis.horizontal value creates a row. The default value is NSLayoutConstraint.Axis.horizontal.

    Declaration

    Swift

    public var axis: NSLayoutConstraint.Axis { get set }
  • The current ratio for all the split subviews

    Declaration

    Swift

    public var ratios: [CGFloat] { get }
  • The minimum ratios for all the split subviews

    Declaration

    Swift

    public var minimumRatios: [CGFloat] { get }
  • Set the minimum ratio for a specific view

    Declaration

    Swift

    public func setMinimumRatio(_ ratio: CGFloat, for view: UIView)
  • A Boolean value that determines whether the split view lays out its split views relative to its layout margins.

    If true, the stack view will layout its split views relative to its layout margins. If false, it lays out the split views relative to its bounds. The default is false.

    Declaration

    Swift

    public var isLayoutMarginsRelativeArrangement: Bool { get set }