Post

Replies

Boosts

Views

Activity

Unwanted animation when moving items in SwiftUI list
Hi,I have follow code for create movable List using SwiftUI:struct ContentView: View { @State var numbers = ["1", "2", "3"] @State var editMode = EditMode.inactive var body: some View { NavigationView { List { ForEach(numbers, id: \.self) { number in Text(number) } .onMove { self.numbers.move(fromOffsets: $0, toOffset: $1) } } .navigationBarItems(trailing: EditButton()) .navigationBarTitle("Numbers") } } }But I have strange unwanted animation when move item up in SwiftUI list.I recorded a video that shows the problem:https://www.youtube.com/watch?v=JpVes2nFTMEQuestions:Is this a known problem?Is there a workaround? Did I implement onMove correctly?Using XCode 11.4.1 and the build target is iOS 13.4.1
1
0
2.0k
May ’20