You use the UISwitch class to create and manage the On/Off buttons which can be seen in iOS, for example, in the preferences (Settings) for such services as Airplane Mode. These objects are known as switches. The UISwitch class declares a property and a method to control its on/off state. As with UISlider, when the user manipulates the switch control a UIControlEventValueChanged event is generated, which results in the control sending an action message.
A UISwitch lets the user turn an option on and off in iOS. UISwitches used throughout the Settings app to let a user quickly toggle a specific setting.
Switches do not need a delegate to function properly; their parent view controller can define their behavior without implementing any delegate protocols.
You can customize the appearance of the switch by changing the color used to tint the switch when it is on or off.
Reference Link : UISwitch Document
For more information about appearance and behavior configuration, see Switches