1

I'd like to disable touch handling for a UIView but keep it enabled for one of its subviews.

The problem is once I set userInteractionEnabled to false on the parent view, I can't bring it back by explicitly setting it to true in a sub view.

How can I enable userInteractionEnabled selectively just for one sub view?

Bernd
  • 11,133
  • 11
  • 65
  • 98
  • you can't do this if you disabled userInteraction on superview .http://stackoverflow.com/a/10881013/3901620 – KKRocks May 01 '17 at 05:52
  • 1
    Create a custom UIView class and implement `hitTest`as in this topic: http://stackoverflow.com/questions/4661589/how-to-get-touches-when-parent-view-has-userinteractionenabled-set-to-no-in-ios – Duyen-Hoa May 01 '17 at 09:17

0 Answers0