简体   繁体   中英

Is there an animation that does a pulsating effect?

I need to make an image that does a pulsating effect (fading in and out). I have another way to accomplish this with NSArray of images, but if there is an easier way that someone can point to me I will appreciate it. I do not want to make too many images.

There is no pulse animation. What you want to do is:

[UIView animateWithDuration:0.3
                  animation:^{
                      // Fade In
                  }
                completion:^(BOOL finished) {
                      [UIView animateWithDuration:0.3
                                       animation:^{
                                           // Fade Out
                                       }
                 }];

Repeat as necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM