I have a collectionView with some cells in it. On top of each cell i have a button, so when I press the button the view switches to another controller.
My problem now is, that when I touch the cell and try to scroll, it doesn't.
(Because of the button on top of it)
For the same issue in UIScrollView there's this method:
override func touchesShouldCancel(in view: UIView) -> Bool {
// Makes the scrollView scrollable when there's a button on top.
return true
}
I also tried this method instead:
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
print("Nothing")
}
And nothing happens.
How can i fix this ?