Modern SwiftUI: Navigation, Part 2

Episode #216 • Dec 12, 2022 • Subscriber-Only

We add more screens and more navigation to our rewrite of Apple’s Scrumdinger, including the standup detail view, a delete confirmation alert, and we set up parent-child communication between features.

Navigation, Part 2
Introduction
00:05
The standup detail view
01:04
The delete confirmation alert
16:19
Parent-child communication
24:31
Next time: effects
40:33

Unlock This Episode

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

Introduction

So, this is absolutely incredible. Because we have decided to extract our feature’s logic into a proper observable object, we instantly get the ability to write tests. And these tests are covering very complicated logic, that we actually got wrong at first, and is even proving how focus moves around the screen.

So, while using a plain binding in the EditStandupView was the easiest way to get started with the feature, it definitely is not the most future proof way to structure things. Using bindings directly in the view means that all of your feature’s logic is going to have to be in the view. It will be very difficult to get test coverage on that logic, so as the feature gets more complex you may want to upgrade the binding to a proper model.

And with that the EditStandupView is feature complete and fully tested. It’s time to move onto the next piece of functionality in the application: the ability to drill down to a detail view so that you can make edits to an existing meeting.

Let’s quickly remind ourselves what that looked like over in Apple’s Scrumdinger application, and then see what it takes to rebuild.

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

Getting started with Scrumdinger

Apple

Learn the essentials of iOS app development by building a fully functional app using SwiftUI.

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.

XCTest Dynamic Overlay

Brandon Williams & Stephen Celis • Wednesday Mar 17, 2021

XCTest Dynamic Overlay is a library we wrote that lets you write test helpers directly in your application and library code.

Packages authored by Point-Free

Swift Package Index

These packages are available as a package collection, usable in Xcode 13 or the Swift Package Manager 5.5.

Downloads