Skip to content

Latest commit

 

History

History

Checkbox

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Checkbox

The Checkbox offers a binary choice.

Usage

The Checkbox is used as any other view.

The component has two mechanisms for notify when the value changes. You can use the onValueChanged close

checkbox.onValueChanged = { checked in
    // do something
}

or using the target-action pattern of UIControl. Checkbox only send actions for UIControl.Event.valueChanged,

checkbox.addTarget(self, action: #selector(checkboxTapped), for: .valueChanged)
``