pub unsafe trait BEDragInteractionDelegate: UIDragInteractionDelegate + MainThreadOnly {
// Provided methods
unsafe fn dragInteraction_prepareDragSession_completion(
&self,
drag_interaction: &BEDragInteraction,
session: &ProtocolObject<dyn UIDragSession>,
completion: &DynBlock<dyn Fn() -> Bool>,
)
where Self: Sized + Message { ... }
unsafe fn dragInteraction_itemsForAddingToSession_forTouchAtPoint_completion(
&self,
drag_interaction: &BEDragInteraction,
session: &ProtocolObject<dyn UIDragSession>,
point: CGPoint,
completion: &DynBlock<dyn Fn(NonNull<NSArray<UIDragItem>>) -> Bool>,
)
where Self: Sized + Message { ... }
}BEDragInteraction only.Expand description
Provided Methods§
Sourceunsafe fn dragInteraction_prepareDragSession_completion(
&self,
drag_interaction: &BEDragInteraction,
session: &ProtocolObject<dyn UIDragSession>,
completion: &DynBlock<dyn Fn() -> Bool>,
)
Available on crate feature block2 only.
unsafe fn dragInteraction_prepareDragSession_completion( &self, drag_interaction: &BEDragInteraction, session: &ProtocolObject<dyn UIDragSession>, completion: &DynBlock<dyn Fn() -> Bool>, )
block2 only.Called when the drag interaction has begun, to allow the delegate to prepare for the drag session before
the system requests drag items through -dragInteraction:itemsForBeginningSession:.
You should call the completion block as soon as the drag session is prepared, as to minimize the delay
from the user interaction from the drag gesture. There is a system-defined timeout before the drag session is
failed if the completion is not called in time. The completion block returns YES if the drag session did
prepare successfully prepare, and NO otherwise, to allow clients to perform any clean-up if necessary.
Sourceunsafe fn dragInteraction_itemsForAddingToSession_forTouchAtPoint_completion(
&self,
drag_interaction: &BEDragInteraction,
session: &ProtocolObject<dyn UIDragSession>,
point: CGPoint,
completion: &DynBlock<dyn Fn(NonNull<NSArray<UIDragItem>>) -> Bool>,
)
Available on crate features block2 and objc2-core-foundation only.
unsafe fn dragInteraction_itemsForAddingToSession_forTouchAtPoint_completion( &self, drag_interaction: &BEDragInteraction, session: &ProtocolObject<dyn UIDragSession>, point: CGPoint, completion: &DynBlock<dyn Fn(NonNull<NSArray<UIDragItem>>) -> Bool>, )
block2 and objc2-core-foundation only.The asynchronous counterpart to -dragInteraction:itemsForAddingToSession:withTouchAtPoint: to allow
touches on this view to add items to an existing drag session. Please refer to the aforementioned delegate method for its full
documentation.
If this method is implemented, then the UIDragInteractionDelegate counterpart method will no longer be called.
You should call the completion block as soon as the items are ready. There is a system-defined
timeout before the system will treat the delegate call as returning an empty array. The completion block
returns YES if the drag session did add items to the session successfully, and NO otherwise, to allow
clients to perform any clean-up if necessary.