Nicholas Clooney

Tagged "swift-series"

8 entries

blog: A refresher on SwiftUI state management, async/await, and common patterns

I published A refresher on SwiftUI state management, async/await, and common patterns, turning a private set of interview-prep notes into a working refresher for the SwiftUI you actually meet in real codebases. It covers the pre-iOS 17 property wrappers next to their @Observable equivalents, async/await as the default for data loading, and the everyday shapes for networking, navigation, and error handling. The next entry in the Swift series, written for the version of me that has been away from SwiftUI long enough to want one page that catches him back up.

blog: The Confident Lie: What AI Got Wrong About @ViewBuilder

I published The Confident Lie: What AI Got Wrong About @ViewBuilder, a SwiftUI debugging note that came out of the ProjectSpire card view work. It captures a small but useful lesson: body gets @ViewBuilder from the View protocol, but a custom computed some View property needs the annotation explicitly if I want an if without an else. The compiler was right, the AI was overconfident, and now the mistake is written down somewhere I can find again.

blog: Three ways to pass an @Observable object in SwiftUI

I published Three ways to pass an @Observable object in SwiftUI, a short SwiftUI reference for choosing between environment injection, direct initializer passing, and @Binding. It keeps the distinction focused on ownership and coupling: whole-object reference sharing when the child is allowed to know the model, or a projected binding when the child should only see one value.