Declaration

class GSFlowView

Declaration

@interface GSFlowView : NSView

Declaration

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.NSAccessibilityElementProtocol
  • AppKit.NSAccessibilityProtocol
  • AppKit.NSAnimatablePropertyContainer
  • AppKit.NSAppearanceCustomization
  • AppKit.NSDraggingDestination
  • AppKit.NSStandardKeyBindingResponding
  • AppKit.NSTouchBarProvider
  • AppKit.NSUserActivityRestoring
  • AppKit.NSUserInterfaceItemIdentification
  • Foundation.NSCoding
  • ObjectiveC.NSObjectProtocol
  • Swift.CVarArg
  • Swift.CustomDebugStringConvertible
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype

Relationships

Inherits From

  • NSView

Inherited By