SwiftUI Drag and Drop files

前端 未结 3 409
深忆病人
深忆病人 2020-12-06 15:05

I am trying to add a \"Drag and Drop\" gesture / function to my SwiftUI Mac application.

I want to drop files from my System/ Desktop into my Application. It is pos

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 15:43

    Can’t you use onDrop(of:isTargeted:perform:)? You can pass your array of supported types in the of argument.

提交回复
热议问题