Hi All, I'm very new to iOS app development. I've managed to complete the Scrumdinger tutorial. However, I would like to know how can I use CoreData or CloudKit to persist the data.
URL: https://developer.apple.com/tutorials/app-dev-training/persisting-data
I'm having trouble to bind the data to EditView(). Is there any online guide or tutorial that can help me?
Thank you!
Found a solution to persist data in Edit Mode. In your Edit View
// Core Data Model
@ObservedObject var data: Data
// Your Text Field
@State private var titleInput: String = ""
NavigationView {
Form {
TextEditor(text: $titleInput)
}
}
.onAppear {
self.titleInput = self.data.title
}