'Block touch propagation to another view
I have a child view that puts itself over other sibling views. The problem is that when I touch it, the sibling also reacts at the touch event. How can I disable touch propagation on the underlying sibling views?
Solution 1:[1]
In theory, if you overlap the tab bar with a view with exclusiveTouch = YES, it should not respond to this touch, either.
Try setting exclusiveTouch = YES and, maybe, add the overlay view as a subview of tabBarController.view (and bring it to the front).
Solution 2:[2]
I assume that your views react on the same selector. Look at InterfaceBuilder to the Connections Inspector which action reacts on which event. If this fails, you can stop a view of reacting on user interaction with:
UIView userInteractionEnabled
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Peter Mortensen |
| Solution 2 | Peter Mortensen |
