Oscillating view animation

Can someone explain to me how to create oscillation animations in ImageView.

I have a tag image, and I want to animate it.

any snippets of CABasicAnimation code for it ???

+4
source share
1 answer

You can use:

+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion 

And use the Ease in and Ease out transitions to speed up and slow down at the end.

Note: block-based animation is only valid in version 4.0 and later, if you want earlier, you need to use

 + (void)beginAnimations:(NSString *)animationID context:(void *)context 

And its simple editing of the presentation frame.

0
source

All Articles