Returns layout attributes for the drop target at the specified point.
- macOS 10.11+
A point in the collection view’s coordinate system. Use this point to determine whether the drop would occur on an item or between items.
A layout attributes object that identifies the element in which the drop would occur.
The default implementation of this method tests the specified point to see if it lands inside an item, supplementary view, or decoration view of the collection view. If it does, the method returns the layout attributes for that element.
Layouts that support inter-item gaps as drop targets must override this method and use it to return the layout attributes that represent that gap. In your implementation, calculate the index path just after the gap and pass that value to the
init(for class method of
NSCollection. Set the
frame property of the resulting attributes object to the rectangle that best represents the gap and also contains the specified point. When overriding this method, you can call
super at any time to get the default behavior.