Package apple.uikit.protocol
Interface UITableViewDropCoordinator
-
public interface UITableViewDropCoordinator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NSIndexPathdestinationIndexPath()The last hit-tested index path known during the drop session.UIDragAnimatingdropItemIntoRowAtIndexPathRect(UIDragItem dragItem, NSIndexPath indexPath, CGRect rect)Animate the dragItem to a rect inside an existing row.UITableViewDropPlaceholderContextdropItemToPlaceholder(UIDragItem dragItem, UITableViewDropPlaceholder placeholder)Animate the dragItem to an automatically inserted placeholder row.UIDragAnimatingdropItemToRowAtIndexPath(UIDragItem dragItem, NSIndexPath indexPath)Animate the dragItem to a row that you inserted at this index path.UIDragAnimatingdropItemToTarget(UIDragItem dragItem, UIDragPreviewTarget target)Animate the dragItem to a location specified by the UIDragPreviewTarget.NSArray<?>items()Ordered list of items available for this drop.UITableViewDropProposalproposal()The current drop proposal at the time of the drop.UIDropSessionsession()The drop session.
-
-
-
Method Detail
-
destinationIndexPath
NSIndexPath destinationIndexPath()
The last hit-tested index path known during the drop session. When the drop is at the end of a section, this index path will be for a row that does not yet exist (equal to the number of rows in that section), where an inserted row would append to the end of the section. This index path may be nil in some circumstances (e.g. when dragging over empty space where there are no cells), and if it is nil, the proposal's intent will always be UITableViewDropIntentUnspecified.
-
dropItemIntoRowAtIndexPathRect
UIDragAnimating dropItemIntoRowAtIndexPathRect(UIDragItem dragItem, NSIndexPath indexPath, CGRect rect)
Animate the dragItem to a rect inside an existing row. The rect is in the coordinate space of the cell at this index path. The item will be animated with an aspect fit scale transform to fit inside the rect. Use a rect with zero size to shrink the item to a single point.
-
dropItemToPlaceholder
UITableViewDropPlaceholderContext dropItemToPlaceholder(UIDragItem dragItem, UITableViewDropPlaceholder placeholder)
Animate the dragItem to an automatically inserted placeholder row. Once the dragItem data is available, you can exchange the temporary placeholder cell with the final cell using the placeholder context method -commitInsertionWithDataSourceUpdates:
-
dropItemToRowAtIndexPath
UIDragAnimating dropItemToRowAtIndexPath(UIDragItem dragItem, NSIndexPath indexPath)
Animate the dragItem to a row that you inserted at this index path. You must call -performBatchUpdates:completion: to update your data source and insert a new row into the table view prior to calling this method. If desired, use the drop delegate method -tableView:dropPreviewParametersForRowAtIndexPath: to provide preview parameters.
-
dropItemToTarget
UIDragAnimating dropItemToTarget(UIDragItem dragItem, UIDragPreviewTarget target)
Animate the dragItem to a location specified by the UIDragPreviewTarget. The -[UITableViewDropItem previewSize] may be helpful to compute an appropriate transform.
-
items
NSArray<?> items()
Ordered list of items available for this drop.
-
proposal
UITableViewDropProposal proposal()
The current drop proposal at the time of the drop.
-
session
UIDropSession session()
The drop session.
-
-