Make UIView pass through touch events?

2020-05-29 13:27发布

问题:

Is there a way to make a UIView unresponsive AND pass through all touch events? Basically I just want to display graphics on top of other UIViews without blocking touch events.

回答1:

The event sent to your view will go through the responder chain, if it doesn't implement any event handling method.

You could also set the userInteractionEnabled property to NO for that view.