Reputation: 4081
I have created a view which has an object img
which is a subclass of UIImageView
and I have added the touchesEnded
method to the img
class. But when I click on the img
class object, the touchesEnded event
is not triggered.
Does anyone have an idea what may be wrong, please?
Thank you!
Upvotes: 1
Views: 927
Reputation: 170819
UIImageView
by default has userInteractionEnabled
property set to NO so it does not track any touch events. Try to set userInteractionEnabled to YES
Upvotes: 1