Hi,
I have a UIImageView which has a png image sequence loaded into it.
My question is - Do you know of any way I can "ping pong" the animation sequence? So that it plays forward from 1-24 then plays backwards from 24-1 and loops.
(technically it should be : 1-24 then 23-1 then 2-24 then 23-1...etc)
- (void) loadAnim01 {
mon01 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mon01_01.png"]];
mon01.center = CGPointMake(258,69);
NSMutableArray *array = [NSMutableArray array];
for (int i = 1; i <= 24; i++)
[array addObject:[UIImage imageNamed:[NSString stringWithFormat:@"mon01_%02d.png",i]]];
mon01.animationImages = array;
mon01.animationDuration = 1.0;
mon01.animationRepeatCount = 0;
[self.view addSubview:mon01];
[mon01 release];
}
Thank a lot!