I have a collection view, and added a UIView below it. The cells shows up on top of it, but they aren't selectable. How can I make them selectable again?
What I have tried so far:
UIView has zPosition -1 and my cells have +1 UIView.isUserInteractionEnabled = true
I have tried to add the UIView both as view.addSubview and collectionView?.addSubview
collectionView?.insertSubview(UIView, belowSubview: collectionView!)
This guy has the same problem, with no solution provided: Inserting Subview Below UICollectionView
Edit: I'm using this code to determine what cells are selected
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
{
//Code here...
}
It all works when there is no UIView below. But I want to have a visible "container" for my collectionview content insets, so I created an UIView. Problem is the above code doesn't get fired at all when clicking on the cells with the UIView below.