《省钱达人》与《猎豆优选》UI相同版。域名tbk

CALayer+Transition.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #import <QuartzCore/QuartzCore.h>
  2. @interface CALayer (Transition)
  3. // 动画类型
  4. typedef NS_ENUM(NSInteger, TransitionAnimType){
  5. TransitionAnimTypeRippleEffect=0,
  6. TransitionAnimTypeSuckEffect,
  7. TransitionAnimTypePageCurl,
  8. TransitionAnimTypeOglFlip,
  9. TransitionAnimTypeCube,
  10. TransitionAnimTypeReveal,
  11. TransitionAnimTypePageUnCurl,
  12. TransitionAnimTypeRamdom,
  13. };
  14. // 方向
  15. typedef NS_ENUM(NSInteger, TransitionSubType){
  16. TransitionSubtypesFromTop=0,
  17. TransitionSubtypesFromLeft,
  18. TransitionSubtypesFromBotoom,
  19. TransitionSubtypesFromRight,
  20. TransitionSubtypesFromRamdom,
  21. };
  22. // 动画曲线
  23. typedef NS_ENUM(NSInteger, TransitionCurve) {
  24. TransitionCurveDefault,
  25. TransitionCurveEaseIn,
  26. TransitionCurveEaseOut,
  27. TransitionCurveEaseInEaseOut,
  28. TransitionCurveLinear,
  29. TransitionCurveRamdom,
  30. };
  31. /**
  32. * 转场动画
  33. *
  34. * @param animType 转场动画类型
  35. " * @param subtype 转动动画方向
  36. * @param curve 转动动画曲线
  37. * @param duration 转动动画时长
  38. *
  39. * @return 转场动画实例
  40. */
  41. -(CATransition *)transitionWithAnimType:(TransitionAnimType)animType subType:(TransitionSubType)subType curve:(TransitionCurve)curve duration:(CGFloat)duration;
  42. @end