100 Days of SwiftUI

Day 90

2026-08-22

Project 17, part 5

More with Flashzilla

Fixing the bugs

Improving accessibility and UX

Adding and deleting cards

He shows using UserData, but of course we could use SwiftData or something else. I’d probably want to have a way to import questions and answers.

In Swift 6 I got “Call to main actor-isolated initializer ‘init()’ in a synchronous nonisolated context” for the .sheet line.

.sheet(isPresented: $showingEditScreen, onDismiss: resetCards, content: EditCards.init)

The fix is to use a closure – which in his example he removed, saying something something syntactic sugar.

.sheet(isPresented: $showingEditScreen, onDismiss: resetCards) {
            EditCards()
        }

Apparently Swift 6 went low-sugar for this code.