开发者

Oscillating View Animation

Can some one please guide me how to create an Oscillation Animation on an ImageView.

I have a tag image and i wan开发者_开发百科t to animate it..

any code snippets of CABasicAnimation for it???


You could 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 accelerate and decelerate toward the end.

Note: the blocks based animation is only valid in is 4.0 and later if you want earlier you need to use

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

And its a simple matter of editing the frame of the view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜