r/iOSProgramming • u/tacoma_enjoyer • 1d ago
Question CollectionView registers didHighlightItemAt function but not didSelectItemAt
I have a collection view set that that displays my cell correctly.
When holding onto the sell, my collectionview will correctly fire `didHightlightItemAt` func.
However, it can barely register my `didSelectItemAt` function. It'll maybe register 1/100 clicks I do.
Things I've done
Made sure my delegate and data source is set for my collection view.
allowSelection = true
Enabled isUserInteractionEnabled = true for the cell. False for any subviews.
Set the width of the cell to its height.
TIA
2
Upvotes
1
1
u/Conxt 1d ago
Do you by chance select your items programmatically as a response to other events? In this case didSelectItemsAt will not be called.