I have a layout as below. Image view inside a view that takes half of view controller (white one). Image view fills container considering some margins on the top and bottom. I have scale mode on the image view set to aspect fit. All this gives me the the exact visual effect I want.
However I have also tap gesture recognizer installed on the image view, and I want it to detect taps only on the area where actual image is displayed (due to aspect fit it takes only a part of available space). The image itself will be dynamically changed so that I don't know what aspect ratio it's going to have. What would be the easiest way to achieve this?
I guess I would have to get rid of traililnig and leading constraints on the image view, but what next?