好吧,如果有人遇到同样的问题,这里是如何做到的:
- (IBAction)barButtonAction:(UIBarButtonItem *)sender {
NSArray *frameArray=[NSArray arrayWithObjects:[UIImage imageNamed:@"01-refresh.png"], [UIImage imageNamed:@"02-redo.png"], [UIImage imageNamed:@"03-loopback.png"], [UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"],[UIImage imageNamed:@"03-loopback.png"], nil];
self.button.image=[UIImage animatedImageWithImages:frameArray duration:10.0];
}