YMCaptchaTextLineView.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // YMCaptchaTextLineView.h
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2023/5/5.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface YMCaptchaTextLineView : UIView
  10. typedef void(^YMCaptchaTextLineViewSelectChangeBlock)(YMCaptchaTextLineView *lineView, BOOL selected);
  11. @property (nonatomic, strong) UIView *lineView;
  12. @property (nonatomic, assign) BOOL selected;
  13. /**
  14. 下划线颜色
  15. 状态:未选中状态,且没有填充文字时
  16. 默认:[UIColor colorWithRed:49/255.0 green:51/255.0 blue:64/255.0 alpha:1]
  17. */
  18. @property (nonatomic, copy) UIColor *underlineColorNormal;
  19. /**
  20. 下划线颜色
  21. 状态:选中状态时
  22. 默认:[UIColor colorWithRed:49/255.0 green:51/255.0 blue:64/255.0 alpha:1]
  23. */
  24. @property (nonatomic, copy) UIColor *underlineColorSelected;
  25. /**
  26. 下划线颜色
  27. 状态:未选中状态,且有填充文字时
  28. 默认:[UIColor colorWithRed:49/255.0 green:51/255.0 blue:64/255.0 alpha:1]
  29. */
  30. @property (nonatomic, copy) UIColor *underlineColorFilled;
  31. /**
  32. 选择状态改变时回调
  33. */
  34. @property (nonatomic, copy) YMCaptchaTextLineViewSelectChangeBlock __nullable selectChangeBlock;
  35. - (instancetype)initWithFrame:(CGRect)frame UNAVAILABLE_ATTRIBUTE;
  36. @end
  37. NS_ASSUME_NONNULL_END