views:

150

answers:

1

I have a view that is moving. The view is sometimes on and sometimes off screen - it 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

A: 

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?

hoopjones
Not working... The touch is received when it is on the view's original position. but after that no dice..
According to my testing, this is incorrect. Hit testing is done on a `UIView`'s `.frame` property, and Core Animation animates the `view.layer.presentationLayer.frame`. The `view.frame` property only changes at the start of the animation. See this answer: http://stackoverflow.com/questions/2968873/iphone-uiview-animation-disables-uibutton-subview/2969324#2969324
Nick Forge