I'm having trouble updating my view after editing CoreData.
I have this entry in my CoreData entity named "TST" and through a NavigationLink I'm editing it's name
NavigationLink(destination: editingPage(thread: tr.title)){
Text(tr.title)}
@State var thread : String
Form {
TextField("thread", text:$thread)
}.onDisappear{
do {
try self.managedObjectContext.save()
} catch {
print(error.localizedDescription)
}
}
after editing and saving the MOC It doesn't display the changes until I either restart the app, or go back to the beginning of my navigation View.
Should I have a fetch request on all page displaying CoreData's data? or having some kind of ObservedObject ?
What I'm looking for is the same as changing your device's name in the device settings menu.
Thanks Tim