I have a custom UIView subclass that has a UITapGestureRecognizer attached to it. I am trying to use this custom view inside of a UIView (container) inside of a UIScrollView, inside of a UITableViewCell.
So:
UITableViewCell
•UIScrollView
••UIView (container for proper contentSize on UIScrollView)
•••Bunch of UIViews with UITapGestureRecognizer (subclass)
It seems that if I don't use a 'container' view inside the UIScrollView, the taps get detected just fine. But then the contentSize is not correct and some of my custom views inside the UIScrollView are off screen and can't be accessed.
If I do use a 'container' view inside the UIScrollView, the contentSize for the scroll view is correct, but none of the custom view taps get detected.
I have tried all sorts of variations of the below with no success:
tapGesture.cancelsTouchesInView = false
scrollView.canCancelContentTouches = false
scrollView.userInteractionEnabled = true
containerView.userInteractionEnabled = true