简单动画-块动画

//一定时间内完成动作后执行某个动作

+(void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^__nullable)(BOOL finished))completion;

//一定时间内完成动作

+(void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations;

/*

duration : 动画时间

delay : 延迟时间

dampingRatio : 阻尼系数(弹性) 越小越弹

velocity : 速率

options : 选项

animations : 做动画的代码块

completion : 动画完成的代码块 "回调"

*/

+(void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatioinitialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^__nullable)(BOOL finished))completion;

你可能感兴趣的:(简单动画-块动画)