Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Picker in a TextField with Core Data, error “Result of 'Picker <Label, SelectionValue, Content>' initializer is unused”
cannot modify the original post, so repost the question: how to get the value picked by catePickerView from cateName of CatesEnt entity to be saved in fileCate in FilesEnt entity via a TextField? HStack { Text("Folder:") TextField("select", text: $fileData.fileCate) catePickerView(cateName: Array(cates), selectedCate: $selectedCate) // catePickerView works fine by itself }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to SwiftUI Picker in a TextField with Core Data, error “Result of 'Picker <Label, SelectionValue, Content>' initializer is unused”
OOPer, try to get the picked value of Picker that is from attribute of CatesEnt, to show on TextField and save into fileCate attribute of FilesEnt. How can I do that? thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to SwiftUI Picker in a TextField with Core Data, error “Result of 'Picker <Label, SelectionValue, Content>' initializer is unused”
cannot modify the original post, so repost the question: how to get the value picked by catePickerView from cateName of CatesEnt entity to be saved in fileCate in FilesEnt entity via a TextField? HStack { Text("Folder:") TextField("select", text: $fileData.fileCate) catePickerView(cateName: Array(cates), selectedCate: $selectedCate) // catePickerView works fine by itself }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21