I have a view with @Bindable property. (It's a model)
I can use TextField("Name", text: $chore.name), but not Picker(selection: $chore.choreFrequency, label: EmptyView())
The auto-complete doesn't even show choreFrequency as an option
enum ChoreFrequency: String, CaseIterable, Identifiable, Codable {
case daily, weekly, monthly, seasonal
var id: ChoreFrequency { self }
}
@Model
class Chore: Identifiable {
@Attribute(.unique) var id = UUID()
var name: String
var frequency: ChoreFrequency
var assignedTo: FamilyMember
var isComplete: Bool
var dueDate: Date
}
Can I not use the Bindable property in the Picker?