SwiftUIDragDrop icon indicating copy to clipboard operation
SwiftUIDragDrop copied to clipboard

"'Modified' is not a member type of 'Self'" error

Open ByteSizeCode opened this issue 4 years ago • 1 comments

The return type 'Self.Modified <DropContainerModifier>' gives this error for the functions in files: View+Draggable.swift and View+Droppable.swift.

ByteSizeCode avatar Jun 08 '20 00:06 ByteSizeCode

Changing it to the below fixes the issue:

public extension View { func draggable(id: UUID) -> some View { ModifiedContent(content: self, modifier: DragElementModifier(elementId: id)) } }

ByteSizeCode avatar Jun 08 '20 00:06 ByteSizeCode