Episode #441

Paging Between Views with SwiftUI

35 minutes
Published on May 29, 2020

This video is only available to subscribers. Get access to this video and 573 others.

Paging between views is something that is not yet provided by SwiftUI, but we can lean on UIViewControllerRepresentable to borrow this behavior from UIKit. Doing so we'll learn about the Coordinator design for handling events via delegates and datasources. We'll also see some of the rough edges you might run into when using this technique.

In this episode I mention that paging is not built-in to SwiftUI (which was true at the time of recording). Luckily, iOS 14 brings PageTabViewStyle which you can use with a TabView to get a similar effect to what we have in this episode.

This episode uses Xcode 11.4.1, Swift 5.2.