About This Title

Pages: 354
Published: March 2024
ISBN: 9781944994051
In Print

The Mystery of the Mutating Mannequin

An Exploration of Data Flow in SwiftUI

by Daniel H Steinberg

The Mystery of the Mutating Mannequin is a fun, fast-moving tour of the different techniques of flowing data through your SwiftUI app from @State through SwiftData.


This work was written and produced entirely by the author. We are proud to be distributing it.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

Get all eBook formats here for $30.00 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


The Mystery of the Mutating Mannequin is a fun, fast-moving tour of the different techniques of flowing data through your SwiftUI app.

We start with the simplest of views that contains no state to those that use simple properties, State properties, or share state using Binding. Throughout this journey through things you thought you knew, we use various tools to see which views are redrawn when and why.

Next, we manage and persist an object graph manually or go old school with Core Data on your way to learning about the future when we work with SwiftData.

What You Need

You need Xcode 15 or above running on Mac OS Sonoma.

Source code, Errata, Typos, Suggestions

Resources

Releases:

  • P1.0 2024/03/10

Contents & Extracts

  • Chapter 1: Simple Views
    • Through the window display
    • We begin
    • Modifiers
    • Composition
    • Road Map
    • Credits, Bio, and Version History
  • Chapter 2: View Identity
    • A Simple Model
    • Stored Properties
    • State and Memory
    • State and Identity
    • Changing State
    • Adding a Conditional
    • Identity
  • Chapter 3: Sharing State
    • Binding
    • Introducing Journey
    • More Bindings
    • ObservableObject
    • Environment
    • AsyncSequence
    • Observable
    • Bindable
    • Binding and Bindable
  • Chapter 4: Saving our Work
    • Multiple Journeys
    • Persistence
    • Amuse Bouche
    • The Stack
    • The Managed Object Model
    • Core Data Relationships
    • Custom Classes
    • Full Circle-ish and Beyond
  • Chapter 5: SwiftData
    • Stubbing out the Model
    • The Model Macro
    • SwiftData Relationships
    • The SwiftData Stack
    • Queries
    • Adding and Deleting
    • Updating
    • Severing Relationships

Author

Daniel H Steinberg is the author of more than a dozen books including the best selling books A Functional Programming Kickstart, A Swift Kickstart, Second Edition and Dear Elena. He has written apps for the iPhone and the iPad since the SDKs first appeared and has written programs for the Mac all the way back to System 7.

Daniel presents iOS, Functional Programming, SwiftUI, and Swift training and consults through his company Dim Sum Thinking. When he’s not coding or talking about coding for the Mac, the iPhone, and the iPad he’s probably cooking, baking bread, or hanging out with friends. Details on his training and speaking are on the Dim Sum Thinking website.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

Get all eBook formats here for $30.00 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

Related Titles:

About This Title

Pages: 354
Published: March 2024
ISBN: 9781944994051
Edition: 1
In Print