开发者

How can I detect a touch on an animated subview ? Or click an animated UIButton?

开发者 https://www.devze.com 2022-12-22 22:11 出处:网络
I have a view that is moving. The view is sometimes on and sometimes off screen - i开发者_运维技巧t is twice the width of the screen.

I have a view that is moving. The view is sometimes on and sometimes off screen - i开发者_运维技巧t is twice the width of the screen. In this view, there are buttons that I need to be able to click. I've tried doing this in many ways already - using pure buttons using touches began on UIView

I'm doing the animation using a CGPath in core animation

Any help would be most appreciated

Thanks


Whether the view is moving or not should irrelevent to the touch detection. If you have a UIButton object and are handling the UIEventControlTouchUpInside (forgot the exact name) event , it should be called when it sees a touch. Is that not working for you?

0

精彩评论

暂无评论...
验证码 换一张
取 消