I use relationships and when I delete some items from a list, the data are deleted from the database but they are not removed from the list.
I use a simple workaround:
After saving the data, I reload the view.
import SwiftUI
struct CustomView: View {
...
var body: some View {
...
do {
try self.managedObjectContext.save()
CustomView()
} catch {
...
}
}
}
Post
Replies
Boosts
Views
Activity
You have to use the data API. It is the only way for custom view.