I was previously able to use the method didSelectItemAt for a collectionView, but ever since implementing a function override for pressesBegan in its corresponding cells, didSelectItemAt no longer seems to be getting invoked.
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// This used to work before overriding pressesBegan()...
}
The pressesBegan override in the correspond开发者_高级运维ing cell:
override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) {
super.pressesEnded(presses, with: event)
}
Are there adjustments I need to make so didSelectItemAt continues to work? Thanks.
精彩评论