I am developing a simple game on the iPhone, and I started with a View-based application, and through I UIViewControllerload a custom UIViewone that contains several more UIViewand some UIImageViews. I want to detect touch events on some of UIImageViews, but so far I have not been able to.
I created a second project for testing and realized that it UIImageViewhandles touch events when the hierarchy is similar:
UIViewControllerβ UIViewβ UIImageView,
but when you like it:
UIViewControllerβ UIViewβ UIViewβUIImageView
they are not detected.
Notes:
- userInteractionEnabled YESin all cases
- all UIViewsand UIImageViewsI mention above are user subclasses.
- , , UIImageView , ?