Class
GSFlowSegmentedControl
A flow-layout segmented control that wraps across multiple lines when the available width is exhausted. The API closely mirrors NSSegmentedControl.
Declaration
class GSFlowSegmentedControlDeclaration
@interface GSFlowSegmentedControl : GSFlowViewDeclaration
class GSFlowSegmentedControl(GSFlowView)Overview
Set segmentCount, then configure each segment with setLabel:forSegment:, setImage:forSegment:, etc. Attach a target/action to be notified when selection changes.
All GSFlowView layout properties (spacing, insets, alignment) apply.
Topics
Instance Properties
Number of segments. Increasing this appends new (empty) segments; decreasing it removes segments from the trailing end.
The index of the selected segment, or –1 if no segment is selected. In
NSSegmentSwitchTrackingSelectAnymode, reflects the most recently toggled segment. Setting this programmatically does not fire the action.Controls how segments respond to clicks. Default:
NSSegmentSwitchTrackingSelectOne.
Instance Methods
Selects or deselects a specific segment without firing the action. In
SelectOnemode, selecting a segment deselects all others.Fixed pixel width for the segment. Pass 0 to let the segment size itself to fit its content (the default).
Relationships
Inherits From
Conforms To
AppKit.NSAccessibilityElementProtocolAppKit.NSAccessibilityProtocolAppKit.NSAnimatablePropertyContainerAppKit.NSAppearanceCustomizationAppKit.NSDraggingDestinationAppKit.NSStandardKeyBindingRespondingAppKit.NSTouchBarProviderAppKit.NSUserActivityRestoringAppKit.NSUserInterfaceItemIdentificationFoundation.NSCodingObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype