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

gillyD
  • 707
  • 5
  • 14

1 Answers1

-1

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
  • 27
  • 1
  • 4
  • Not working... The touch is received when it is on the view's original position. but after that no dice.. – gillyD Mar 16 '10 at 23:18
  • 2
    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 Aug 23 '10 at 07:40