Unlock This Episode
Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.
Introduction
Brandon: So this is pretty incredible. Not only do we have an amazing observation tool for UIKit, but it also works on basically any version of iOS released in the past 5 years. And it didn’t take much work for us to accomplish this. It’s all thanks to Swift’s observation tools and our back-port of the those tools.
Stephen: But now it’s time to push these tools even harder, because so far our app is very simple. We are just setting up some labels and conditionally showing and hiding certain components. Things start getting really interesting when we think about navigation. And as we’ve all learned from SwiftUI, it is great to drive navigation from state rather than it being a “fire-and-forget” occurrence.
Driving navigation from state allows your features to inspect the exact state of your app at any moment, makes it easy to deep-link into any screen of your application, and also makes it easy to write tests that show how multiple features integrate together.
What does it take to perform state-driven navigation in UIKit? Well, not only is possible, but it’s even pretty easy to accomplish, and it’s really incredible to see. We really can build complex navigation flows in a UIKit application in a very similar manner that we do for SwiftUI.
Let’s take a look.
Subscribe to Point-Free
Access this episode, plus all past and future episodes when you become a subscriber.
Already a subscriber? Log in
References
Collection: Modern SwiftUI
Brandon Williams & Stephen Celis • Monday Nov 28, 2022What does it take to build a vanilla SwiftUI application with best, modern practices? We rebuild Apple’s Scrumdinger code sample, a decently complex application that tackles real world problems, in a way that can be tested, modularized, and uses all of Swift’s powerful domain modeling tools.
SwiftUI Navigation
Brandon Williams & Stephen Celis • Tuesday Nov 16, 2021After 9 episodes exploring SwiftUI navigation from the ground up, we open sourced a library with all new tools for making SwiftUI navigation simpler, more ergonomic and more precise.
SwiftUI Navigation
Brandon Williams & Stephen Celis • Tuesday Sep 7, 2021A library we open sourced. Tools for making SwiftUI navigation simpler, more ergonomic and more precise.
CasePaths
Brandon Williams & Stephen CelisCasePaths
is one of our open source projects for bringing the power and ergonomics of key paths to enums.
Clocks
Brandon Williams & Stephen Celis • Monday Jan 8, 2024Our back-port of Swift’s observation tools.