Thursday 15 May 2014

ios - UIImage animation not working for all Button -


I have this simple task where I start the animation of the SAP rate button and then start the animation for every button but I do not know Please click on others, which is why do not just click one button, please help me with this

  - (IBAction) startAnimation: (UIButton *) button {NSMutableArray * imagesArray = [[NSMutableArray Alloc] init]; (Int images = 0; images & lt; 15; images ++) {UIImage * buttonImage = [UIImage imageNamed: [NSString stringWithFormat: @ "aaqqq00% 02d.png", image]]; [Images add object: button image]; } NSARRA * Reversed Anime = [[Image array reverse object enumerator] All objects]; Int buttontag = button tag; AnimButton.adjustsImageHighlighted = No; (UIButton * animButton = (UIButton *) [self.view viewWithTag: buttonTag]; if (Images & lt; = buttonTag) {animButton.imageView} for images (0f images = 0; images & lt; 15; images ++) animationImages = imagesArray; [Animetn button set image: [UIImage imageNamed: @ "aaqqq0014.png"] forState: UIControlStateNormal];} and {animButton.imageView.animationImages = reversed Anime [Animtn button set image: [UIImage imageNamed: @ " aaqqq0000.png "] forState: UIControlStateSelected];} Anselog (@"% @ ", Annimbutnkimej weave. emission images); AnimButton.imageView.animationDuration = 1; // whatever you want animButton.imageView) (in seconds .animationRepeatCount = 1; [AnimButton.imageView startAnimating];}}    

If you are going through button, tag lookup is futile and error prone (if you have multiple views with the same tag hierarchy).

button image view animation images ( animButton.imageView.animationImages ) setting and then setting a single image ( [animated buttons set image ... ) is futile

What does your log statement say about animation images?

No comments:

Post a Comment