Modern UIKit: Unified Navigation

Episode #285 • Jul 1, 2024 • Subscriber-Only

We have built the foundation of powerful new UIKit navigation tools, but they’re not quite finished. Let’s improve these APIs to handle dismissal by leveraging another SwiftUI tool: bindings. We will see how SwiftUI bindings are (almost) the perfect tool for UIKit navigation, and we will see where they fall short.

Unified Navigation
Introduction
00:05
Dismissal
00:41
Even better presentation APIs
14:12
Simultaneous presentation problems
23:07
Next time: Binding from scratch
34:50

Unlock This Episode

Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.

Introduction

Stephen: So we have now taken a huge step towards making a generic, reusable navigation helper for UIKit. This little helper could even be extracted out into a library and imported into any project that wants a powerful navigation tool for UIKit.

Brandon: However, there is still one big problem with the tool, and that is we are not properly detecting when the controller is dismissed by the user, such as swiping down on a sheet. We need to detect that situation so that we can update the state in the model so that our model and UI can remain consistent.

Let’s give that a shot.

This episode is for subscribers only.

Subscribe to Point-Free

Access this episode, plus all past and future episodes when you become a subscriber.

See plans and pricing

Already a subscriber? Log in

References

Collection: Modern SwiftUI

Brandon Williams & Stephen Celis • Monday Nov 28, 2022

What 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, 2021

After 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, 2021

A library we open sourced. Tools for making SwiftUI navigation simpler, more ergonomic and more precise.

CasePaths

Brandon Williams & Stephen Celis

CasePaths 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, 2024

Our back-port of Swift’s observation tools.

Downloads