So , I am testing out a game with a simple ball (which is basically an object of UIImageView) fixed on the screen using CGPointMake and I am implementing a simple swipe gesture with UIGestureRecognizerDelegate.
My intention is to just flick the ball in a direction and I want the ball to move in that direction (flawlessly- which means the movement has to be really smooth), and it will depend on the direction and speed of the swipe.
I can understand that I can work with UISwipeGestureRecognizer and UIPanGestureRecognizer and find out the velocity of the swipe and fix the ball again with CGPointMake.
But, is there a really good way to obtain a really smooth movement on the ball with a particular velocity and direction ?
If i was you I’d try the normal touchesBegan:withEvent: methods that every UIView implements. Then you can always set the new frame until the touches end. Then you can calculate the direction and speed to continue moving it using an animation.