Class
GSFlowView
A view that arranges its managed subviews in a left-to-right, wrapping flow layout — similar to NSStackView but multi-line. The view sizes itself to the height required to fit all subviews at the current width.
Declaration
class GSFlowViewDeclaration
@interface GSFlowView : NSViewDeclaration
class GSFlowView(NSView)Overview
Pin the view’s width with a constraint (or let a parent dictate it). The height will be driven by intrinsicContentSize automatically.
Subviews can be added either programmatically via -addArrangedSubview: or directly in Interface Builder. IB-added subviews are picked up automatically in -awakeFromNib in the order they appear in the XIB.
All subviews must have a fixed size either via their own intrinsicContentSize or via explicit width/height constraints attached to the subview itself.
Topics
Instance Properties
The subviews currently managed by the flow layout. Use -addArrangedSubview: / -removeArrangedSubview: rather than the raw NSView add/remove methods when managing subviews programmatically.
Bottom inset applied inside the view’s bounds before layout. Default: 0.
Left inset applied inside the view’s bounds before layout. Default: 0.
Right inset applied inside the view’s bounds before layout. Default: 0.
Top inset applied inside the view’s bounds before layout. Default: 0.
Convenience accessor that aggregates the four inset properties. Setting this updates all four individual inset properties.
Typed convenience wrapper around flowAlignmentValue.
How subviews are aligned horizontally within each row. Default: FlowViewAlignmentLeading. IBInspectable surfaces this as an integer: 0 = Leading, 1 = Center, 2 = Justified.
Horizontal gap between subviews on the same row. Default: 8.
Vertical gap between rows. Default: 8.
Instance Methods
Relationships
Inherits From
NSView
Inherited By
Conforms To
AppKit.NSAccessibilityElementProtocolAppKit.NSAccessibilityProtocolAppKit.NSAnimatablePropertyContainerAppKit.NSAppearanceCustomizationAppKit.NSDraggingDestinationAppKit.NSStandardKeyBindingRespondingAppKit.NSTouchBarProviderAppKit.NSUserActivityRestoringAppKit.NSUserInterfaceItemIdentificationFoundation.NSCodingObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype
Relationships
Inherits From
NSView