i have a 50.png in my animation what is the best method to animate it? cycle for? NSTimer with call a void, plus a variable and update my png? thank's in advance
Asked
Active
Viewed 37 times
0
-
You'll have to provide more information than that. When you say animate, do you mean move it around the screen? Or do you mean you want the picture in the png to move? – Fogmeister Apr 15 '13 at 07:44
-
sorry, i have a UIImageView and i want to animate it, not move around screen – user2202681 Apr 15 '13 at 07:56
-
1Fogmeister is a simple static animation, i have series of png 1 to 50 for animate my UIImageView MyAnimation.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"1.png"], [UIImage imageNamed:@"2.png"], [UIImage imageNamed:@"3.png"], [UIImage imageNamed:@"4.png"], [UIImage imageNamed:@"5.png"], [UIImage imageNamed:@"6.png"], [UIImage imageNamed:@"7.png"],nil]; – user2202681 Apr 15 '13 at 08:04
-
but this is for little animation :) – user2202681 Apr 15 '13 at 08:08
-
http://developer.apple.com/library/ios/documentation/uikit/reference/UIImageView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006889-CH3-SW8 – Desdenova Apr 15 '13 at 08:14
-
See my answer for to this question: http://stackoverflow.com/questions/8112698/how-to-do-animations-using-images-efficiently-in-ios/8113027#8113027 – MoDJ Nov 28 '14 at 09:18