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

9. Integrating UIKit

Jayant Varma1 
(1)
Melbourne, VIC, Australia
 

In the previous chapter, we learned about Previews and how we can view our UI while we are still developing the SwiftUI code. This allows us to view the layout, and if we are in debugging mode, we can also interact with our UI. So far, we have kept our SwiftUI separate and not used any UIKit either. It is almost as if this were a separate technology or language.

In this chapter, we shall go a little further and look at how we can integrate our SwiftUI and UIKit elements together.

SwiftUI

When we create a SwiftUI project, there are a couple of files that are created for us. Like any other ...

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.