CAAnimation+CoinAnimation.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // CAAnimation+CoinAnimation.h
  3. // BuguLive
  4. //
  5. // Created by yy on 17/1/6.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import <QuartzCore/QuartzCore.h>
  9. @interface CAAnimation (CoinAnimation)
  10. /**
  11. * 抖动动画
  12. */
  13. + (CAKeyframeAnimation *)jitterAnimation;
  14. /**
  15. * 呼吸灯动画
  16. *
  17. * @param time 动画时间
  18. * @param fromValue 开始透明度
  19. * @param toValue 结束透明度
  20. */
  21. + (CABasicAnimation *)AlphaLight:(float)time fromValue:(float)fromValue toValue:(float)toValue;
  22. /**
  23. * 先移动后缩小动画
  24. *
  25. * @param begin 移动开始的位置
  26. * @param end 移动结束的位置
  27. * @param moveTime 移动的时间
  28. * @param narrowTime 缩小的时间
  29. * @param narrowFromValue 缩小开始倍率
  30. * #param narrowToValue 缩小结束倍率
  31. * @return CAAnimationGroup 动画组
  32. */
  33. + (CAAnimationGroup *)coinMoveAntimationWithBegin:(CGPoint)begin WithEnd:(CGPoint)end andMoveTime:(CGFloat)moveTime andNarrowTime:(CGFloat)narrowTime andNarrowFromValue:(CGFloat)narrowFromValue andNarrowToValue:(CGFloat)narrowToValue;
  34. @end