techytube | Working with UISwitch objects in iOS @techytube | Uploaded 11 years ago | Updated 2 hours ago
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
You use the UISwitch class to create and manage the On/Off buttons you see, 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. When the user manipulates the switch control ("flips" it) a UIControlEventValueChanged event is generated, which results in the control (if properly configured) sending an action message.
You can customize the appearance of the switch by changing the color used to tint the switch when it is in the on position.
In iOS 5 and iOS 6 you can set some properties that gives you even more possibilities of customisation.
For more, you can visit the Apple's Online Documentation at:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UISwitch_Class/Reference/Reference.html
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
You use the UISwitch class to create and manage the On/Off buttons you see, 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. When the user manipulates the switch control ("flips" it) a UIControlEventValueChanged event is generated, which results in the control (if properly configured) sending an action message.
You can customize the appearance of the switch by changing the color used to tint the switch when it is in the on position.
In iOS 5 and iOS 6 you can set some properties that gives you even more possibilities of customisation.
For more, you can visit the Apple's Online Documentation at:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UISwitch_Class/Reference/Reference.html