Detect which image was clicked in UIImageView with animationImages

前端 未结 4 1767
耶瑟儿~
耶瑟儿~ 2020-12-20 08:50

We can specify images array for a UIImageview, and it will animate the images very nicely. I have subclassed the UIImageView class.

Now whe

4条回答
  •  [愿得一人]
    2020-12-20 09:09

    I suppose you could trap the gesture's location with [gesture locationInView:self]. If you could also capture the elapsed time of the animation, you could calculate exactly which image(s) were on screen at the time of the tap and on which visible image the tap landed.

提交回复
热议问题