UISwitch
A control that offers a binary choice, such as on/off.
Declaration
@MainActor class UISwitchMentioned in
Overview
The UISwitch class declares a property and a method to control its on/off state. When a person manipulates the switch control (“flips” it), it triggers the valueChanged event.
You can customize the appearance of the switch by changing the color used to tint the switch when it’s on or off.
For information about basic view behaviors, see View Programming Guide for iOS.