I suspect everyone knew this except me, but there’s an overload for
.sheet(isPresented: Binding, onDismiss:content:)
…which I did not know existed until just now. In case you’re also one of the 10,000, @BenRiceM just pointed this out to me:
.sheet(item: Binding<Item?>, onDismiss:content:)
https://developer.apple.com/documentation/swiftui/view/sheet(item:ondismiss:content:)
Which would have prevented me from making manual bindings using
Binding.init(get: { someStateValue != nil } set: { … })
🤦♂️ × ∞
=> More informations about this toot | More toots from caseyliss@mastodon.social
@caseyliss @BenRiceM Objective-C’s naming conventions were too long and too verbose. But they were descriptive and easy to remember.
Swift and SwiftUI are on the opposite side, with the concise syntax used everywhere. But sometimes it feels like writing an encrypted message. It feels good only if you remember every single detail about it.
I wish we could settle for something in the middle.
=> More informations about this toot | More toots from ivanpavlov@mastodon.social
@ivanpavlov @caseyliss @BenRiceM Also in general "reactive" programming does not works well with traditional code autocompletion. I know OOP is "out of fashion" lately, but autocompletion was made for this era: you typed an object/class, entered „." and bam - you have all operations you can do on this object. Simple.
Now we have "modifiers” that belong to basically any View. Code completion became basically useless in SwiftUI...
=> More informations about this toot | More toots from kkolakowski@mastodon.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini