Is there a way to save the offset of a shape after a drag gesture in SwiftUI?

90 Views Asked by At

Good morning Everyone, I'm building an app that allows to create and add “tables”(rectangles) to a floor plan of a restaurant. I would like to know if there is a way in SwiftUI to save the position of every ”table” that the user creates before and after the user have dragged them across the screen to arrange them as the restaurant disposition.

Thanks in advance!

I tried to use the drag gesture and it's fine the way it works, but once you close the app from the multitasking the shapes return in the center of the screen.

0

There are 0 best solutions below