RQTimingView.h 845 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // RQTimingView.h
  3. // XinShouJiaDao
  4. //
  5. // Created by 张嵘 on 2021/7/13.
  6. // Copyright © 2021 JCZ. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. #define RQ_TIMING_VIEW [RQTimingView sharedInstance]
  11. @interface RQTimingView : UIView
  12. ///init
  13. @singleton(RQTimingView);
  14. /// Timer
  15. @property (nonatomic, readonly, strong) NSTimer *timer;
  16. /// Label
  17. @property (nonatomic, readwrite, strong) UILabel *titleLabel;
  18. @property (strong, readwrite, nonatomic) NSString *classIdStr;
  19. /// 设置显示or隐藏
  20. - (void)setHide:(BOOL)hide;
  21. - (BOOL)isHide;
  22. // 开始计时
  23. - (void)beginTiming;
  24. // 暂停计时
  25. - (void)pauseTiming;
  26. // 继续计时
  27. - (void)continueTiming;
  28. // 结束计时
  29. - (void)endTiming;
  30. - (void)stopTiming;
  31. - (void)stopTimingWithResultBlock:(void (^)(BOOL isSuccessed))resultBlock;
  32. @end
  33. NS_ASSUME_NONNULL_END