Cocoa iPhone SDK development - touchesBegan method not working if the UIImageView has CABasicAnimation attached
I've created a class derived from UIImageView (class name Customer). Within this Customer class I implemented the method "touchesBegan" .
Also, I applied a CABasicAnimation to the layer of the Customer class . (the animation simply moves the imageview. it's neccessary because i want to track the animationDidStop event) .
the problem is that the touchesBegan doesn't work when i touch the current position of the imageview. it works only when i touch the original frame (where it was created).
My suggestion is that touchesBegan not applying on the presentationLayer, but on the original frame .
Do you have a way of solving this issue ?? I really would like to solve this from within the Customer class , and not from the开发者_JAVA技巧 main UIViewController .
Thanks a lot, Shahar.
Have you enabled userInteraction
flag to YES
for Customer
class.
Thanks,
精彩评论