Search code examples
iossuperview

Tell Superview to ignore touch events?


I am adding a subview to my superview and I need to know how to tell the superview to ignore touch events so that the only view receiving touch events, is the subview. How would this be done?

Thanks!


Solution

  • Set the userInteractionEnabled property of the superview to NO:

    view.superview.userInteractionEnabled = NO;