Todo App in SwiftUI

In this series we build a persistent todo app using SwiftUI. We'll create custom controls, implement text editing and sorting of rows. Finally we'll see how to implement persistence using Boutique.

Length: about 2 hours


1. Todo App in SwiftUI - State and Bindings

Subscribers only

Kicking off a new series on building a Todo App in SwiftUI. In this episode we focus primarily on the preliminary data structure, deciding who owns this data and when to use State versus Bindings when separating our app into distinct views.

2. Todo App in SwiftUI - Fancy Checkbox

Subscribers only

In this episode we design a checkbox for our todo UI. We see how we can stroke and fill shapes, how to use InsettableShape, and how to apply a shadow without applying it to every view in the hierarchy.

3. Todo App in SwiftUI - Creating, Editing, and Controlling Focus

Subscribers only

In this episode we make the todos editable and implement keyboard avoidance. We create a "new todo" button and then set up programmatic control over focus. Along the way we'll see why choosing a proper Hashable value is important.

4. Swipe to Delete

Subscribers only

In this episode we'll implement swipe to delete so we can remove todo items.

5. Drag to Reorder Todos

Subscribers only

In this video we discuss a couple of options for implementing drag to reorder so that we can reorder our todos. We also implement a feature to automatically move completed todos to the bottom, and bringing them back when unchecked.

6. Adding Persistence with Boutique

Subscribers only

Now that we have a working Todo app, it's time to focus on persistence, so that our changes are kept when we launch the app. This will change the structure slightly, as we'll bring in a popular new library called Boutique and its Store to provide this facility. We'll also introduce the concept of a "controller", which is more of a model controller than a controller you might be familiar with in UIKit MVC.

7. Fixing Persistent Sorting

Subscribers only

In this episode we fix an issue that caused our sorting logic to be lost after adding persistence.