NatSelectionControl
public class NatSelectionControl : UIView
NatSelectionControl is a class that represents Design System’s selection control component. The component colors changes according to the current theme configured in the Design System.
The component has 2 styles:
- checkbox
- radio
Example of usage:
NatSelectionControl(style: .radioButton)
And it can be configured with a label:
NatSelectionControl(style: .checkbox, text: "The text for the label")
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
-
Undocumented
Declaration
Swift
public var handler: SelectionHandler? { get set }
-
Attribute that sets and checks if the component is selected.
Declaration
Swift
public var isSelected: Bool { get set }
-
Attribute that sets and checks if the component is enabled.
Declaration
Swift
public var isEnabled: Bool { get set }
-
Attribute that sets and checks if haptic feedback for touch is enabled.
Declaration
Swift
public var isHapticFeedbackEnabled: Bool { get set }
-
Attribute that sets and checks if indeterminate state is selected
Declaration
Swift
public var isIndeterminate: Bool { get set }
-
Undocumented
Declaration
Swift
public var labelComponent: String? { get set }
-
Undocumented
Declaration
Swift
public var theme: AvailableTheme { get set }
-
Undocumented
Declaration
Swift
public init(style: Style, text: String? = nil, theme: AvailableTheme = .none)
-
Undocumented
Declaration
Swift
public override func layoutSubviews()
-
Undocumented
Declaration
Swift
public func configure(text: String?)
-
Style represents styles values for the NatSelectionControl component.
These are all styles allowed for a NatSelectionControl:
- checkbox
- radioButton
Declaration
Swift
public enum Style