© Jayant Varma 2019
J. VarmaSwiftUI for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-5516-2_3

3. Views and Controls

Jayant Varma1 
(1)
Melbourne, VIC, Australia
 

In the last chapter, we looked at what makes SwiftUI tick, the features that make the magic happen. However, that was a bit dry, mostly consisting of theory. The big thing in capitals that makes up and is part of SwiftUI is UI – that which is visual. So, in this chapter, we shall look at the various UI elements and their native UIKit counterparts. This could also function as a ready reckoner to help choose the appropriate element as required.

Everything Is a View

In SwiftUI, almost everything is a view, and this is different from the traditional View, the UI element that we are used ...

Get SwiftUI for Absolute Beginners: Program Controls and Views for iPhone, iPad, and Mac Apps 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.