I have a custom UIControl
element, a picker with little scroller. I want to hide it when I tap outside it. I have tried adding UITapGestureRecognizer
to self.view but it fails, as there are many subviews (complex UICollectionView
cells) and they intercept this recognizer.
I want the recognizer to take over any touches, I create it in method that shows my picker, and I remove it when I hide it.
Adding it to the window did not help either, as setting :
self.hideLePickerRecognizer.cancelsTouchesInView = YES;
What can I do about it?