views:

25

answers:

1
+1  Q: 

TouchesEnded event

Hi,

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!

+1  A: 

UIImageView by default has userInteractionEnabled property set to NO so it does not track any touch events. Try to set userInteractionEnabled to YES

Vladimir