Quantcast
Channel: specialeffects Feed
Viewing all articles
Browse latest Browse all 3

How to create a Pulse Effect on UIViews using Core Animation in iOS?

$
0
0

Core Animation based on Quartz provides very simple ways to create special effects in your game or application.

The following shows how to create a Pulse Effect of any UIView (e.g. UIButtonView, UIImageView etc.)

  1. +(void)pulse:(UIView*)view toSize:(float) value withDuration:(float) duration
  2. {
  3.     CABasicAnimation *pulseAnimation =[CABasicAnimation animationWithKeyPath:@"transform.scale"];
  4.     pulseAnimation.duration = duration;
  5.     pulseAnimation.toValue =[NSNumber numberWithFloat:value];;

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images