Package apple.uikit.protocol
Interface UITableViewDragDelegate
-
public interface UITableViewDragDelegate_______________________________________________________________________________________________________________ Drag & Drop API-Since: 11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable UIDragPreviewParameterstableViewDragPreviewParametersForRowAtIndexPath(@NotNull UITableView tableView, @NotNull NSIndexPath indexPath)Allows customization of the preview used for the row when it is lifted or if the drag cancels.default booleantableViewDragSessionAllowsMoveOperation(@NotNull UITableView tableView, @NotNull UIDragSession session)Controls whether move operations are allowed for the drag session.default voidtableViewDragSessionDidEnd(@NotNull UITableView tableView, @NotNull UIDragSession session)Called to signal the end of the drag session.default booleantableViewDragSessionIsRestrictedToDraggingApplication(@NotNull UITableView tableView, @NotNull UIDragSession session)Controls whether the drag session is restricted to the source application.default voidtableViewDragSessionWillBegin(@NotNull UITableView tableView, @NotNull UIDragSession session)Called after the lift animation has completed to signal the start of a drag session.default @NotNull NSArray<? extends UIDragItem>tableViewItemsForAddingToDragSessionAtIndexPathPoint(@NotNull UITableView tableView, @NotNull UIDragSession session, @NotNull NSIndexPath indexPath, CGPoint point)Called to request items to add to an existing drag session in response to the add item gesture.@NotNull NSArray<? extends UIDragItem>tableViewItemsForBeginningDragSessionAtIndexPath(@NotNull UITableView tableView, @NotNull UIDragSession session, @NotNull NSIndexPath indexPath)Provide items to begin a drag associated with a given index path.
-
-
-
Method Detail
-
tableViewDragPreviewParametersForRowAtIndexPath
@Nullable default @Nullable UIDragPreviewParameters tableViewDragPreviewParametersForRowAtIndexPath(@NotNull @NotNull UITableView tableView, @NotNull @NotNull NSIndexPath indexPath)
Allows customization of the preview used for the row when it is lifted or if the drag cancels. If not implemented or if nil is returned, the entire cell will be used for the preview.
-
tableViewDragSessionAllowsMoveOperation
default boolean tableViewDragSessionAllowsMoveOperation(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session)Controls whether move operations are allowed for the drag session. If not implemented, defaults to YES.
-
tableViewDragSessionDidEnd
default void tableViewDragSessionDidEnd(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session)Called to signal the end of the drag session.
-
tableViewDragSessionIsRestrictedToDraggingApplication
default boolean tableViewDragSessionIsRestrictedToDraggingApplication(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session)Controls whether the drag session is restricted to the source application. If not implemented, defaults to NO.
-
tableViewDragSessionWillBegin
default void tableViewDragSessionWillBegin(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session)Called after the lift animation has completed to signal the start of a drag session. This call will always be balanced with a corresponding call to -tableView:dragSessionDidEnd:
-
tableViewItemsForAddingToDragSessionAtIndexPathPoint
@NotNull default @NotNull NSArray<? extends UIDragItem> tableViewItemsForAddingToDragSessionAtIndexPathPoint(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session, @NotNull @NotNull NSIndexPath indexPath, CGPoint point)
Called to request items to add to an existing drag session in response to the add item gesture. You can use the provided point (in the table view's coordinate space) to do additional hit testing if desired. If not implemented, or if an empty array is returned, no items will be added to the drag and the gesture will be handled normally.
-
tableViewItemsForBeginningDragSessionAtIndexPath
@NotNull @NotNull NSArray<? extends UIDragItem> tableViewItemsForBeginningDragSessionAtIndexPath(@NotNull @NotNull UITableView tableView, @NotNull @NotNull UIDragSession session, @NotNull @NotNull NSIndexPath indexPath)
Provide items to begin a drag associated with a given index path. You can use -[session locationInView:] to do additional hit testing if desired. If an empty array is returned a drag session will not begin.
-
-