본문 바로가기

Programming/Udacity Nano Degree - iOS Developer

Class: UISwitch

A control that offers a binary choice, such as on/off.

Declaration

class UISwitch : UIControl

Overview

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 (“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 is on or off.

valueChanged

A touch dragging or otherwise manipulating a control, causing it to emit a series of different values.

 

Declaration

static var valueChanged: UIControl.Event { get }