Animation on button using images

I have a UIButton which has arrow kind of blue image set as

     UIImage *arrowImage = [UIImage imageNamed:@"bluearrow.png"];
    [self.prevbutton setBackgroundImage:arrowImage forState:UIControlStateNormal];

Now I have another image yellow.png, that I want to super impose on top of this button image and make a flashing animation continuously. How can I do this?

Answers


This should help you.

myButton.imageView.animationImages =
[NSArray arrayWithObjects:[UIImage imageNamed:@"image1.png"],
                          [UIImage imageNamed:@"image2.png"],
                          nil];
myButton.imageView.animationDuration = 0.5; //whatever you want (in seconds)
[myButton.imageView startAnimating];

As quoted from https://stackoverflow.com/a/7490535/716216


Need Your Help

Meteor app doesn't work in production

meteor iron-router blueimp

I am trying to use blueimp image gallery in a meteor application. My image gallery works in development, however when I run it like this: