I need to swap the positions of two or more objects， just like Iphones swap the location of apps.
When I’m holding down an object, I can drag it，, and when I drag it to another object, the positions of the two objects are automatically switched， just like the APP on the phone.
When I presseed the object, I can drag it.But I don’t how to make it swap postion with another object.
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
If possible, add screenshots and/or videos about the current state.