搜索
您的当前位置:首页正文

新浪微博加号按钮动画实现方案

来源:二三娱乐

1.使用UIView的动画实现:

+ (void)animateWithDuration:(NSTimeInterval)duration

delay:(NSTimeInterval)delay

usingSpringWithDamping:(CGFloat)dampingRatio

initialSpringVelocity:(CGFloat)velocity

options:(UIViewAnimationOptions)options

animations:(void (^)(void))animations

completion:(void (^)(BOOL finished))completion

2.动画方案二:

CABasicAnimation *positionAnimation;

positionAnimation = [CABasicAnimation animationWithKeyPath:@"position"];

positionAnimation.fromValue = [NSValue valueWithCGPoint:fromPosition];

positionAnimation.toValue = [NSValue valueWithCGPoint:toPosition];
Top