I would like to implement an action by double clicking an item within a NSCollectionView
. When using the mouseDown
event in the NSCollectionViewItem
no collection view delegate method is fired anymore nor does the items property isSelected
work:
the mouseDown
event in the NSCollectionViewItem.swift
:
override func mouseDown(with event: NSEvent) {
if event.clickCount > 1 {
//do something
}
}
How do I need to handle click events on CollectionViewItems
and CollectionView
delegate methods at the same time?
Other than NSTableview
or NSOutlineView
there is no implemented doubleAction
method for NSCollectionView
. Which is sad.
Thanks!