NatCheckbox
public final class NatCheckbox : UIView
NatCheckbox is a class that represents the Checkbox component from the design system.
Example of usage:
checkbox.configure(isSelected: true)
checkbox.configure(isEnabled: true)
checkbox.configure(text: "Example with label")
checkbox.configure(isIndeterminate: true)
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 checkbox: NatSelectionControl
-
Undocumented
Declaration
Swift
public init(theme: AvailableTheme = .none) -
Attribute that sets a label to the component
Declaration
Swift
public func configure(text: String?) -
Attribute that sets and checks if the component is selected.
Declaration
Swift
public func configure(isSelected: Bool) -
Attribute that sets and checks if the component is enabled.
Declaration
Swift
public func configure(isEnabled: Bool) -
Attribute that sets and checks if indeterminate state is selected
Declaration
Swift
public func configure(isIndeterminate: Bool) -
Sets the handler to be executed when
isSelectedvalue changesExample of usage:
checkbox.configure { isSelected in }Declaration
Swift
public func configure(selectionHandler: @escaping SelectionHandler)Parameters
selectionHandlerA closure to notify value change