# NSCollectionView

Generated at 2026-02-17 21:02:56 +0000
2013, 2021 Free Software Foundation, Inc.
Software documentation for the NSCollectionView class
AppKit/NSCollectionView.h
Description forthcoming.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Description forthcoming.
allowsEmptySelection
Description forthcoming.
allowsMultipleSelection
Description forthcoming.
backgroundColors
Description forthcoming.
backgroundView
Description forthcoming.
backgroundViewScrollsWithContent
Description forthcoming.
collectionViewLayout
Description forthcoming.
content
Description forthcoming.
dataSource
Description forthcoming.
delegate
Description forthcoming.
deleteItemsAtIndexPaths:
indexPaths
Description forthcoming.
deleteSections:
sections
Description forthcoming.
deselectAll:
sender
Description forthcoming.
deselectItemsAtIndexPaths:
indexPaths
Description forthcoming.
draggingImageForItemsAtIndexes:
indexes
withEvent:
event
offset:
dragImageOffset
Description forthcoming.
frameForItemAtIndex:
index
Description forthcoming.
indexPathForItem:
item
Description forthcoming.
indexPathForItemAtPoint:
point
Description forthcoming.
indexPathsForVisibleItems
Description forthcoming.
indexPathsForVisibleSupplementaryElementsOfKind:
elementKind
Description forthcoming.
insertItemsAtIndexPaths:
indexPaths
Description forthcoming.
insertSections:
sections
Description forthcoming.
isSelectable
Description forthcoming.
itemAtIndex:
index
Description forthcoming.
itemAtIndexPath:
indexPath
Description forthcoming.
itemPrototype
Description forthcoming.
layoutAttributesForItemAtIndexPath:
indexPath
Description forthcoming.
layoutAttributesForSupplementaryElementOfKind:
kind
atIndexPath:
indexPath
Description forthcoming.
makeItemWithIdentifier:
identifier
forIndexPath:
indexPath
Description forthcoming.
makeSupplementaryViewOfKind:
elementKind
withIdentifier:
identifier
forIndexPath:
indexPath
Description forthcoming.
maxItemSize
Description forthcoming.
maxNumberOfColumns
Description forthcoming.
maxNumberOfRows
Description forthcoming.
minItemSize
Description forthcoming.
moveItemAtIndexPath:
indexPath
toIndexPath:
newIndexPath
Description forthcoming.
moveSection:
section
toSection:
newSection
Description forthcoming.
newItemForRepresentedObject:
object
Description forthcoming.
numberOfItemsInSection:
section
Description forthcoming.
numberOfSections
Description forthcoming.
performBatchUpdates:
updates
completionHandler:
completionHandler
Description forthcoming.
prefetchDataSource
Description forthcoming.
registerClass:
itemClass
forItemWithIdentifier:
identifier
Description forthcoming.
registerClass:
viewClass
forSupplementaryViewOfKind:
kind
withIdentifier:
identifier
Description forthcoming.
registerNib:
nib
forItemWithIdentifier:
identifier
Description forthcoming.
registerNib:
nib
forSupplementaryViewOfKind:
kind
withIdentifier:
identifier
Description forthcoming.
reloadData
Description forthcoming.
reloadItemsAtIndexPaths:
indexPaths
Description forthcoming.
reloadSections:
sections
Description forthcoming.
scrollToItemsAtIndexPaths:
indexPaths
scrollPosition:
scrollPosition
Description forthcoming.
selectAll:
sender
Description forthcoming.
selectItemsAtIndexPaths:
indexPaths
scrollPosition:
scrollPosition
Description forthcoming.
selectionIndexPaths
Description forthcoming.
selectionIndexes
Description forthcoming.
setAllowsEmptySelection:
flag
Description forthcoming.
setAllowsMultipleSelection:
flag
Description forthcoming.
setBackgroundColors:
colors
Description forthcoming.
setBackgroundView:
backgroundView
Description forthcoming.
setBackgroundViewScrollsWithContent:
f
Description forthcoming.
setCollectionViewLayout:
layout
Description forthcoming.
setContent:
content
Description forthcoming.
setDataSource:
dataSource
Description forthcoming.
setDelegate:
aDelegate
Description forthcoming.
setDraggingSourceOperationMask:
dragOperationMask
forLocal:
localDestination
Description forthcoming.
setItemPrototype:
prototype
Description forthcoming.
setMaxItemSize:
size
Description forthcoming.
setMaxNumberOfColumns:
number
Description forthcoming.
setMaxNumberOfRows:
number
Description forthcoming.
setMinItemSize:
size
Description forthcoming.
setPrefetchDataSource:
prefetchDataSource
Description forthcoming.
setSelectable:
flag
Description forthcoming.
setSelectionIndexPaths:
indexPaths
Description forthcoming.
setSelectionIndexes:
indexes
Description forthcoming.
supplementaryViewForElementKind:
elementKind
atIndexPath:
indexPath
Description forthcoming.
tile
Description forthcoming.
toggleSectionCollapse:
sender
Description forthcoming.
visibleItems
Description forthcoming.
visibleSupplementaryViewsOfKind:
elementKind
Description forthcoming.
Software documentation for the NSCollectionViewDataSource protocol
AppKit/NSCollectionView.h
NSObject
Description forthcoming.
collectionView:
collectionView
itemForRepresentedObjectAtIndexPath:
indexPath
Description forthcoming.
collectionView:
collectionView
numberOfItemsInSection:
section
Description forthcoming.
collectionView:
collectionView
viewForSupplementaryElementOfKind:
kind
atIndexPath:
indexPath
Description forthcoming.
numberOfSectionsInCollectionView:
collectionView
Description forthcoming.
Software documentation for the NSCollectionViewDelegate protocol
AppKit/NSCollectionView.h
NSObject
Description forthcoming.
collectionView:
collectionView
acceptDrop:
draggingInfo
index:
index
dropOperation:
dropOperation
Returns a BOOL to indicate if the drop at index was accepted
collectionView:
collectionView
acceptDrop:
draggingInfo
indexPath:
indexPath
dropOperation:
dropOperation
Returns a BOOL to indicate if the drop at indexPath was accepted
collectionView:
collectionView
canDragItemsAtIndexPaths:
indexPaths
withEvent:
event
Return a boolean indicating if the indexPaths on collectionView can be dragged with the passed in event.
collectionView:
collectionView
canDragItemsAtIndexes:
indexes
withEvent:
event
Return a boolean indicating if the indexes on collectionView can be dragged with the passed in event.
collectionView:
collectionView
didChangeItemsAtIndexPaths:
indexPaths
toHighlightState:
highlightState
This is sent to inform the delegate of those items that did change highlightState.
collectionView:
collectionView
didDeselectItemsAtIndexPaths:
indexPaths
Called to inform the delegate of those items that were deselected.
collectionView:
collectionView
didEndDisplayingItem:
item
forRepresentedObjectAtIndexPath:
indexPath
Called to inform the delegate that the collectionView will end display of item for the object at indexPath.
collectionView:
collectionView
didEndDisplayingSupplementaryView:
view
forElementOfKind:
elementKind
atIndexPath:
indexPath
Called to inform the delegate that the collectionView will end display of supplementaryView for the object at indexPath.
collectionView:
collectionView
didSelectItemsAtIndexPaths:
indexPaths
Called to inform the delegate of those items that were selected.
collectionView:
collectionView
draggingImageForItemsAtIndexPaths:
indexPaths
withEvent:
event
offset:
dragImageOffset
Returns an NSImage representing the items at indexPaths which are being dragged.
collectionView:
collectionView
draggingImageForItemsAtIndexes:
indexes
withEvent:
event
offset:
dragImageOffset
Returns an NSImage representing the items at indexes which are being dragged.
collectionView:
collectionView
draggingSession:
session
endedAtPoint:
screenPoint
dragOperation:
operation
Allows application to specify the screenPoint at which a dragging session did end
collectionView:
collectionView
draggingSession:
session
willBeginAtPoint:
screenPoint
forItemsAtIndexPaths:
indexPaths
Allows application to specify the screenPoint at which a dragging session will begin for the given indexPaths
collectionView:
collectionView
draggingSession:
session
willBeginAtPoint:
screenPoint
forItemsAtIndexes:
indexes
Allows application to specify the screenPoint at which a dragging session will begin for the given indexes
collectionView:
collectionView
namesOfPromisedFilesDroppedAtDestination:
dropURL
forDraggedItemsAtIndexPaths:
indexPaths
Returns an array of filenames for files at indexPaths that will be dropped at the destination specified by NSURL.
collectionView:
collectionView
namesOfPromisedFilesDroppedAtDestination:
dropURL
forDraggedItemsAtIndexes:
indexes
Returns an array of filenames for files at indexes that will be dropped at the destination specified by NSURL.
collectionView:
collectionView
pasteboardWriterForItemAtIndex:
index
Return NSPasteboardWriting object for collectionView at index
collectionView:
collectionView
pasteboardWriterForItemAtIndexPath:
indexPath
Return NSPasteboardWriting object for collectionView at indexPath
collectionView:
collectionView
shouldChangeItemsAtIndexPaths:
indexPaths
toHighlightState:
highlightState
Returns the set of indexPaths that should change their selection. This is sent to inform the delegate of those items that the collectionView would like to change to highlightState.
collectionView:
collectionView
shouldDeselectItemsAtIndexPaths:
indexPaths
Returns the set of NSIndexPath objects that should be deselected given the proposed indexPaths.
collectionView:
collectionView
shouldSelectItemsAtIndexPaths:
indexPaths
Returns the set of indexPaths that should change.
collectionView:
collectionView
transitionLayoutForOldLayout:
fromLayout
newLayout:
toLayout
Called to inform the delegate that the collectionView is transitioning from the old to the new layout indicated.
collectionView:
collectionView
updateDraggingItemsForDrag:
draggingInfo
Update items include in the drag operation for collectionView.
collectionView:
collectionView
validateDrop:
draggingInfo
proposedIndex:
proposedDropIndex
dropOperation:
proposedDropOperation
Return NSDragOperation when performing drag and drop on collectionView at proposedIndex.
collectionView:
collectionView
validateDrop:
draggingInfo
proposedIndexPath:
proposedDropIndexPath
dropOperation:
proposedDropOperation
Return NSDragOperation when performing drag and drop on collectionView at proposedDropIndexPath.
collectionView:
collectionView
willDisplayItem:
item
forRepresentedObjectAtIndexPath:
indexPath
Called to inform the delegate that the item representing the object at indexPath will be displayed.
collectionView:
collectionView
willDisplaySupplementaryView:
view
forElementKind:
elementKind
atIndexPath:
indexPath
Called to inform the delegate that the supplementary view for the elementKind will be displayed at indexPath.
collectionView:
collectionView
writeItemsAtIndexPaths:
indexPaths
toPasteboard:
pasteboard
Return a boolean if the items at indexPaths can be written to the pasteboard
collectionView:
collectionView
writeItemsAtIndexes:
indexes
toPasteboard:
pasteboard
Return a boolean if the items at indexes can be written to the pasteboard
Software documentation for the NSCollectionViewElement protocol
AppKit/NSCollectionView.h
NSObject
NSUserInterfaceItemIdentification
Description forthcoming.
applyLayoutAttributes:
layoutAttributes
Description forthcoming.
didTransitionFromLayout:
oldLayout
toLayout:
newLayout
Description forthcoming.
preferredLayoutAttributesFittingAttributes:
layoutAttributes
Description forthcoming.
prepareForReuse
Description forthcoming.
willTransitionFromLayout:
oldLayout
toLayout:
newLayout
Description forthcoming.
Software documentation for the NSCollectionViewPrefetching protocol
AppKit/NSCollectionView.h
NSObject
Description forthcoming.
collectionView:
collectionView
cancelPrefetchingForItemsAtIndexPaths:
indexPaths
Cancel the prefetch request for the listed indexPaths.
collectionView:
collectionView
prefetchItemsAtIndexPaths:
indexPaths
Load the items listed in indexPaths in collectionView before they are displayed