Post

Replies

Boosts

Views

Activity

Reply to SwiftUI .onDelete not working on WatchOS
It is my understanding that you need both a List and a ForEach, thus:            List {                ForEach(numbers, id: \.self) { name in                   Button(action: {}) { Text(name)               }                .onDelete(perform: removeRows)            } This works fine, except that, unfortunately, on WatchOS 8.1, it will **** up if you reduce the number of items to zero.
Nov ’21