Hi,
it is possible in SwiftUI to detect in a .drop modifier if the source is the running app, or if the source is another app ? This way (example)
it is possible in SwiftUI to detect in a .drop modifier if the source is the running app, or if the source is another app ? This way (example)
Code Block AnyView .onDrop(of: [.fileURL], isTargeted: $targeted) { provider in if provider.type == ImageView.type { // The content comes from the app } else { // The content comes from outside } }