Creating Movable Grids in SwiftUI

In this video, I will explain how to create movable grids by reordering grid items using drag and drop. It is easy to achieve this using two SwiftUI modifiers:
  1. .draggable(Transferable)
  1. .dropDestination()
These modifiers are available from iOS 16+ and make it easy to create reordering grids. For more information about the end result, please refer to the attached GIF.
notion image
To learn more about the implementation, please watch the YouTube video.
Video preview
 

Support meYour support would really help us on creating new videos about SwiftUI Everyday. Thank you.

Copyright © Kavsoft 2020 - 2023