YMCaptchaCountdownButton.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // YMCaptchaCountdownButton.h
  3. // yuemoClient
  4. //
  5. // Created by YoMi on 2023/11/15.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class YMCaptchaCountdownButton;
  10. typedef NSString * _Nullable (^CountDownChanging)(YMCaptchaCountdownButton *countDownButton,NSUInteger second);
  11. typedef NSString * _Nonnull (^CountDownFinished)(YMCaptchaCountdownButton *countDownButton,NSUInteger second);
  12. typedef void (^TouchedCountDownButtonHandler)(YMCaptchaCountdownButton *countDownButton,NSInteger tag);
  13. @interface YMCaptchaCountdownButton : UIButton
  14. @property(nonatomic,strong) id userInfo;
  15. ///倒计时按钮点击回调
  16. - (void)countDownButtonHandler:(TouchedCountDownButtonHandler)touchedCountDownButtonHandler;
  17. //倒计时时间改变回调
  18. - (void)countDownChanging:(CountDownChanging)countDownChanging;
  19. //倒计时结束回调
  20. - (void)countDownFinished:(CountDownFinished)countDownFinished;
  21. ///开始倒计时
  22. - (void)startCountDownWithSecond:(NSUInteger)second;
  23. ///停止倒计时
  24. - (void)stopCountDown;
  25. @end
  26. NS_ASSUME_NONNULL_END