MGBaseCountdownView.h 764 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // MGBaseCountdownView.h
  3. // MGLivenessDetection
  4. //
  5. // Created by megvii on 16/4/12.
  6. // Copyright © 2016Year megvii. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface MGBaseCountdownView : UIView
  10. @property (nonatomic, assign, readonly) CGFloat maxTime;
  11. /**
  12. * 设置倒计时时间
  13. *
  14. * @param time 时间
  15. */
  16. - (void)setMaxTime:(CGFloat)time;
  17. /**
  18. * 开启动画
  19. */
  20. - (void)startAnimation;
  21. /**
  22. * 关闭动画
  23. */
  24. - (void)stopAnimation;
  25. /* 以下方法为 子类重写,每次倒计时改变都会被调用 */
  26. /**
  27. * 倒计时改变
  28. *
  29. * @param lastTime 剩余倒计时时间
  30. */
  31. - (void)timerChangeAndViewAnimation:(CGFloat)lastTime;
  32. /**
  33. * 创建倒计时界面 初始化时候被调用
  34. */
  35. - (void)creatCountDownView;
  36. @end