Okay one for the crowd: Do we have a definitive answer whether a List's selection binding should be Identifiable or not?

Apple seem to play fast and loose with this. Some of their example projects (Food Truck) don't conform to Identifiable, and the Swift header for List only has Hashable as the requirement. Meanwhile the docs say a List's selection should conform to Identifiable.

So what is the truth? What do you do in your apps?

@phill Some of the SwiftUI design choices made a lot more sense to me the first time I used it with CoreData. All of my model objects where automatically observable, hashable, and identifiable, and many things clicked for me.

Some things still haven’t clicked though, haha

Follow

@brandonhorst Aha, the first version of Big Mail used CoreData: never again 🥲

I understand how things piece together, but in practice the API’s never seem to work the way I expect. There's either obscure overloads, hidden environment values, or it doesn't behave the way the docs say it should. Nor does it help that Apple’s own examples are either inconsistent or incomplete.

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.