I have a container view at the bottom of the screen which overlay on top of the main view. A Collection view is embedded in the container which hidden when the view first load. On the main view controller, I have a tap gesture IBaction which unhide/hide the container view when the main view is tapped.
I have another tap gesture IBaction on the imageView in the collection view. I want to load new content in the main view when the collection view cell(image) is tapped.
My problem is the collectionview(container) is hidden again when I tap on the collection view image. It appears to me that the tap gesture on the main view has priority over the tap gesture on the collection view. I have also tried didselecteditematindexpath instead of tap gesture on the collection view controller but it also does not work. I only want the container to be hidden if I tap anywhere on the main view but not the container/collection view. I am at a lost, please help.
I want to mention that swiping the collection view is working fine without additional coding.
Check for Imageview's Property userInteractionEnabled