I want to use core data to store my data. Also, I want to delete the data (row) when I want. I have referenced the site below. https://blckbirds.com/post/core-data-and-swiftui/
The data can be added well, but I want to delete the data without using the List and ForEach{}.onDelete().
However, as a result of my search, I couldn't find a way to delete a row of core data other than using ForEach's .onDelete().
Is there a way to delete specific data (Row) without using list, ForEach onDelete??
moc.delete(LIST_ITEM)thentry? moc.save(), wheremocis defined as@Environment(\.managedObjectContext) private var moc. (That tutorial uses the variable nameviewContextinstead ofmoc). This might also be useful. They useonDelete, but you don't need to use that.