The current state of a drop.
SDKs
- macOS 10.15+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
struct DropInfo
The current state of a drop.
SDKs
Framework
struct DropInfo
var location: CGPoint
The location of the drag in the coordinate space of the drop view.
func has Items Conforming(to: [String]) -> Bool
Indicates whether at least one item conforms to at least one of the specified uniform type identifiers.
func item Providers(for: [String]) -> [NSItem Provider]
Finds items that conform to at least one of the specified uniform type identifiers.
func on Drag(() -> NSItem Provider) -> View
Activates the view as the source of a drag and drop operation.
func on Drop(of: [String], delegate: Drop Delegate) -> View
Defines the destination of a drag and drop operation with the same size and position as the view using behavior controlled by the given delegate.
func on Drop(of: [String], is Targeted: Binding<Bool>?, perform: ([NSItem Provider], CGPoint) -> Bool) -> View
Defines the destination of a drag and drop operation with the same size and position as the view by handling dropped content and the drop location with the specified closure.
func on Drop(of: [String], is Targeted: Binding<Bool>?, perform: ([NSItem Provider]) -> Bool) -> View
Defines the destination for a drag and drop operation with the same size and position as the view by handling dropped content with the specified closure.
func item Provider(Optional<() -> NSItem Provider?>) -> View
Provides a closure that vends the drag representation to be used for a particular data element.
struct Drop Proposal
The behavior of a drop.
enum Drop Operation
Operation types that determine how a drag and drop session resolves when the user drops a drag item.
protocol Drop Delegate
An interface that you implement to interact with a drop operation in a view modified to accept drops.