kopproduction
kopproduction

Reputation: 465

Animating an UIButton on an UIScrollView

I'm having problems animating my button in my scrollview. Basically what I'm doing is moving the button down the y-axis when the button is pressed down and moving it back to it's original position once the press has stopped. My code itself works just fine and does exactly what it is meant to do. Oddly enough, it only does so on a regular View. On a scrollView, it only moves it down after a short delay after it is pressed and the animation is very choppy. I know that there's nothing wrong with my code and that's why I'm so confused. Does anybody have an idea on how to fix this? Any help would be greatly appreciated!

Upvotes: 0

Views: 139

Answers (1)

Stavash
Stavash

Reputation: 14304

Not sure how to make what you want work, but I am pretty sure the "choppy" behaviour is a result of the UIScrollView touch being recognized and activating what it is meant to activate (i.e pan gesture). One idea that comes to mind is to disable scrolling when this action is performed.

Upvotes: 1

Related Questions