Reputation: 2485
Let me emphasize that there are two views that overlap and I want handle the touch gestures of the view on top.
The UIGestureRecognizeDelegate methods work for conflicting gestures within one view not two views from what I have read. Please don't link me to those threads without explaining.
This issue is occurring between the toolbar items and an image view with gestures attached to it.
In the image above the bar buttons cannot be touched.
Other apps handle this case without issues. If I touch a bar button it would work and if I drag the view on the non-overlapped parts I would be able to drag it.
How can I achieve this ?
Currently the image view has gestures attached to it (one for testing, its a pan).
Update
As requested here is a Gif. Notice how the buttons are not responding when there is a view under the toolbar.
Upvotes: 0
Views: 365
Reputation: 2485
The issue was that I was using view.layer.zPosition
, apparently changing the zPosition does not change the position of view is the subview hierarchy (which was something that I assumed).
Source: https://stackoverflow.com/a/15807250/3366784
Upvotes: 0