Unable to Save Picker Result to UserDefaults
问题 I am trying to save the result of a picker to user defaults. The user default save operation occurs in the class UserData via method saveBase. I have tried a similar technique successfully with a button but my call after the picker gives the famous error: Type '()' cannot conform to view. struct aboutView: View { @EnvironmentObject var userData: UserData @State private var baseEntry: Int = 0 let base = ["Level 1", "Level 2","Level 3","Level 4"] var body: some View { Text("comment") Text(