Lists onMove works os on iPadOS but not in iOS

Can't make onMove to work on iOS, it is just not triggered. Is this an iOS bug or I'm missing something? On the iPad is working like a charm.

Code Block swift
       List{
        ForEach(names, id: \.self) {name in
          Text(name)
        }.onMove(perform: { indices, newOffset in
          names.move(fromOffsets: indices, toOffset: newOffset)
        })
      }



Thanks!
I have same issue.
Also, onMove not working on macOS Big Sur Beta 6.
In SwiftUI on iOS, Lists must be in "Edit Mode" in order for ".onMove" to work. For some reason ".onDelete" will work even when not in "Edit Mode". You can let the user specifically enter edit mode by embedding the List in a "NavigationView"

Code Block language
NavigationView{
List{
ForEach(names, id: \.self) {name in
Text(name)
}.onMove(perform: { indices, newOffset in
names.move(fromOffsets: indices, toOffset: newOffset)
})
}.navigationBarItems(trailing: EditButton())
}

Or you can always be in "Edit Mode" by setting the environment variable programmatically like this:

Code Block language
List{
ForEach(names, id: \.self) {name in
Text(name)
}.onMove(perform: { indices, newOffset in
names.move(fromOffsets: indices, toOffset: newOffset)
})
}.environment(\.editMode, Binding.constant(EditMode.active))


Lists onMove works os on iPadOS but not in iOS
 
 
Q