Quote:
Originally Posted by azhar.hussain
I was wondering how to add a scrolling menu to my app like tiny wings or angry birds. In tiny wings, the background moves from right to left and I was wondering how they accomplished that. Thanks in advance.
|
Take a look at Core Animation. That makes this sort of thing quite easy.
For iOS 4.0 and later, UIView has some class methods like animateWithDuration:animations: that let you specify a code block to execute as an animation.
All you'd have to do is write a block that changes the center property of an image view so that it moves from right to left across the screen. Something like this:
Code:
[UIView animateWithDuration:1.0
animations:
^{
myImageView.center = CGPointMake(0, 100);
}
];