Chapter 11. Putting Swiftui into Practice: Circles, Timers, Buttons—Oh My!


All the UI elements of the rainbow.


SwiftUI lets you do more than work with Buttons and Lists. You can also use shapes, animations, and more! In this chapter, we’re going to look at some of the more advanced ways you can construct a SwiftUI UI, and connect it to a data source that isn’t just user-generated content like todo items. SwiftUI lets you build responsive UIs that handle events coming from all sorts of places. We’ll be working with Xcode, Apple’s IDE, and we’ll be focusing on iOS apps, but everything you’ll learn is applicable to SwiftUI on iPadOS, macOS, watchOS, and tvOS as well. It’s time to explore the depths of SwiftUI!

What fancy things can be done with a UI framework?


Frank: So, we’ve learned what a UI framework is...

Judy: We even built a pretty good todo List app...

Jo: But what else can we do?

Frank: I imagine we could build another app!

Judy: Well yeah, we could. And we should. But what features haven’t we learned yet? There’s more to it than we’ve learned so far, isn’t there?

Jo: Well yes, there are some more advanced SwiftUI concepts we haven’t looked at yet.

Judy: Shall we build something with one or two of them, then?

Jo: I’d also like to see how we can make a website ...

Get Head First Swift 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.