Sorry for the delay, I didn't get the notification. Thanks for the code, I would recommend to add a link to a focused project where I can download and play with it as of course without the images nor drop targets is hard to see what you are trying to accomplish and will help many developers here figure it out. Customize the drag preview to make the interaction more intuitive. You can modify the draggable modifier .draggable(player, preview: { VStack { Image(jersey) .resizable() .frame(width: 50, height: 50) if let player = content.player { Text(player.last) .font(.caption) } } }) Currently, the drop handler just prints the item. You might want to update the CellContent's player based on the drop? .dropDestination(for: String.self) { items, location in if let firstItem = items.first { print(Dropped: (firstItem)) // Update player logic here if needed // e.g., content.player = updatedPlayerBasedOn(firstItem) } return true } Looking forward to your focused sample. That'll help us better understand what's going on
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: