3

I have an array containing some data that I want to present in a View. It should be possible to rearrange the data by holding and dragging it to its new position. I have used the .onMove modifier on a List generated using ForEach to iterate over every element in the list. My code works exactly as expected, but throws the following error/warning:

2022-10-12 18:48:52.833139+0200 Playground[1212:207280] [EventDispatcher] Found no UIEvent for backing event of type: 11; contextId: 0xFEEA6094

This only happens when using an actual device (iPhone 12 Pro Max on iOS 16.0.2), not when using the simulator (Xcode Version 14.0.1 (14A400), build in simulator of any device that runs iOS 16).

The code (the whole project is way bigger, but this is enough to trigger the error/warning):

struct ContentView: View {
    
    @State var stuffList = ["Beer", "Chips", "Boardgames"]
    
    var body: some View {
        NavigationStack {
            List {
                ForEach(stuffList, id: \.self) { stuff in
                    Text(stuff)
                }
                .onMove { stuffList.move(fromOffsets: $0, toOffset: $1) }
            }
        }
    }
}

Edit:

I have now tried different code snippets from online tutorials, e.g. this one (Hacking in Swift) and I still get this message no matter what I try. As my code seems to work as intended, I will continue my project and treat this as "log noise". If someone knows more about this than I do or simply can confirm having the same issue, it would be highly appreciated.

  • Have you found any solution to this problem we are getting the same issue, when running on iPhone 12 Pro Max on device it happens, but when you pause application and resume the application unfreezes, also if you do a screen share or record screen the issue stops happening. On older devices such as iPhone Xr the issue does not happen even with latest update. The difference is that we believe to be related to a UIScrollView we are using. – Adrian Nov 01 '22 at 16:08
  • I have not found a solution, but the error is not occuring anynore (running iOS 16.1). My guess is a good as yours here, but I think this was a bug in either XCODE or iOS that is fixed now. – cODinG iS eAsY Nov 01 '22 at 16:26

0 Answers0