walalalalalari
walalalalalari

Reputation: 1

Creating a rolling ball

How would you make it so a ball (UIImageView) "rolls" on a solid platform (ground) continuously? I am brand new to animation on the iPhone. Thanks

Upvotes: 0

Views: 556

Answers (1)

Ken Pespisa
Ken Pespisa

Reputation: 22264

You can use the animation features built into UIImageView. You provide all the frames of the rolling ball animation as images in an array, and feed that to the UIImageView. It will then play those images in order, kind of like an animated gif.

I suppose you could then just put the UIImageView on top of a background that moves (or doesn't?) to give the illusion that the ball is rolling.

You might also find the Cocos2d framework helpful.

Upvotes: 1

Related Questions