© Wallace Wang 2019
Wallace WangBeginning iPhone Development with Swift 5https://doi.org/10.1007/978-1-4842-4865-2_10

10. Buttons, Switches, and Segmented Controls

Wallace Wang1 
(1)
San Diego, CA, USA
 

Besides displaying data or letting users input data, the second most important purpose of a user interface is to allow users to control an app. At the simplest level, users can use buttons where each button represents a single command. Of course if you want to display multiple options, displaying multiple buttons on the screen can get crowded.

For two alternatives for giving commands, Xcode offers switches and segmented controls. A switch lets users choose to turn a setting on or off. A segmented control acts like multiple buttons, in a condensed area, ...

Get Beginning iPhone Development with Swift 5: Exploring the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.