TheNounProject / CollectionView

An easy to use, highly customizable replacement for NSCollectionView.
MIT License
121 stars 16 forks source link

Set delegates #3

Closed WCByrne closed 7 years ago

WCByrne commented 7 years ago

The following have been updated to provide the full set of index paths:

@objc optional func collectionView(_ collectionView: CollectionView, shouldDeselectItemAt indexPath: IndexPath) -> Bool
@objc optional func collectionView(_ collectionView: CollectionView, didDeselectItemAt indexPath: IndexPath)
@objc optional func collectionView(_ collectionView: CollectionView, shouldSelectItemAt indexPath: IndexPath, with event: NSEvent?) -> Bool
@objc optional func collectionView(_ collectionView: CollectionView, didSelectItemAt indexPath: IndexPath)

The new versions are:

@objc optional func collectionView(_ collectionView: CollectionView, shouldSelectItemsAt indexPaths: Set<IndexPath>) -> Set<IndexPath>
@objc optional func collectionView(_ collectionView: CollectionView, didSelectItemsAt indexPaths: Set<IndexPath>)    
@objc optional func collectionView(_ collectionView: CollectionView, shouldDeselectItemsAt indexPaths: Set<IndexPath>) -> Set<IndexPath>    
@objc optional func collectionView(_ collectionView: CollectionView, didDeselectItemsAt indexPaths: Set<IndexPath>)
WCByrne commented 6 years ago

Fixes #2