SwiftUI .onDelete throws Fatal Error: Index out of range
问题 I have list of Account s that each of them has a detail page and they are connected through @Binding in the AccountDetailView . Current code work well, updates are fine. No problem at all. However when I added the onDelete modifier to the ForEach below and tried swipe to delete gesture in app, it crashes and says Fatal Error: Index out of range twice. I made some search and learned that ForEach somehow does not get notified -or ignores it, idk much detail- and looks for the last index of the