Learn how to replicate UIKit’s Drag and Drop feature in the SwiftUI
Earlier, we implemented a Drag and Drop feature for UICollectionView, which was used to copy the dragged item. Very useful for functionality like adding items to the cart.
Please check out the article if you’ve missed it.
Last week, we received a new requirement to provide drag and drop feature in the app for a better user experience.
According to requirements, we wanted to allow users to prioritize their activity according to their needs. While we did the implementation with UIKit in the past, we never had a chance to do it using SwiftUI.
I have divided this into 3 parts, feel free to jump around according to your needs!
- Create a basic UI
- Add drag support
- Add drop support and update the list
For detailed implementation, check out our blog.
Latest comments (0)