-
Declaration
Swift
public var node: ArgoKitNode? { get }
-
Initializes the segmented control with the given items. Items may be NSStrings, UIImages, or (as of iOS 14.0) UIActions. When constructing from a UIAction segments will prefer images over titles when both are provided. The segmented control is automatically sized to fit content.
Declaration
Swift
public init(onSegmentedChange: @escaping (_ segmentIndex: Int) -> Void, @ArgoKitViewBuilder _ builder: () -> View)
-
Insert a segment with the given action at the given index. Segments will prefer images over titles when both are provided. When the segment is selected UIAction.actionHandler is called. If a segment already exists with the action’s identifier that segment will either be updated (if the index is the same) or it will be removed (if different).
Declaration
Swift
@available(iOS 14.0, *) @discardableResult public func insertSegment(action: UIAction, at segment: Int, animated: Bool) -> SegmenteControl
-
Reconfigures the given segment with this action. Segments will prefer images over titles when both are provided. When the segment is selected UIAction.actionHandler is called. UIAction.identifier must either match the action of the existing segment at this index, or be unique within all actions associated with the segmented control, or this method will assert.
Declaration
Swift
@available(iOS 14.0, *) @discardableResult public func setAction(_ action: UIAction, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func isMomentary(_ value: Bool) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func apportionsSegmentWidthsByContent(_ value: Bool) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func insertSegment(withTitle title: String?, at segment: Int, animated: Bool) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func insertSegment(with image: UIImage?, at segment: Int, animated: Bool) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func removeSegment(at segment: Int, animated: Bool) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func removeAllSegments() -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setTitle(_ title: String?, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setImage(_ image: UIImage?, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setWidth(_ width: CGFloat, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setContentOffset(_ offset: CGSize, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setEnabled(_ enabled: Bool, forSegmentAt segment: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func selectedSegmentIndex(_ value: Int) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func selectedSegmentTintColor(_ value: UIColor?) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setBackgroundImage(_ backgroundImage: UIImage?, for state: UIControl.State, barMetrics: UIBarMetrics) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setDividerImage(_ dividerImage: UIImage?, forLeftSegmentState leftState: UIControl.State, rightSegmentState rightState: UIControl.State, barMetrics: UIBarMetrics) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setTitleTextAttributes(_ attributes: [NSAttributedString.Key : Any]?, for state: UIControl.State) -> SegmenteControl
-
Undocumented
Declaration
Swift
@discardableResult public func setContentPositionAdjustment(_ adjustment: UIOffset, forSegmentType leftCenterRightOrAlone: UISegmentedControl.Segment, barMetrics: UIBarMetrics) -> SegmenteControl