WXHTextBoxField.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // WXHTextBoxField.h
  3. // xh_textfield
  4. //
  5. // Created by 路 on 2019/4/12.
  6. // Copyright © 2019年 路. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class WXHTextBoxField;
  11. @protocol WXHTextBoxFieldDelegate <NSObject>
  12. @optional
  13. - (void)textField:(WXHTextBoxField *)textField textDidChange:(NSString *)text;
  14. - (void)textField:(WXHTextBoxField *)textField didFinish:(NSString *)text;
  15. @end
  16. @interface WXHTextBoxField : UIControl <UIKeyInput>
  17. @property (weak ,nonatomic) id <WXHTextBoxFieldDelegate>delegate;
  18. @property (assign ,nonatomic) UIEdgeInsets insets; /// 设置文本框边距
  19. @property (assign ,nonatomic) NSInteger numberOfItem; /// 设置文本框数量
  20. @property (strong ,nonatomic) UIColor *normalColor; // 正常状态主题色
  21. @property (strong ,nonatomic) UIColor *activeColor; // 激活状态主题色
  22. @property (strong ,nonatomic) UIColor *normalTextColor; // 正常状态字体色
  23. @property (strong ,nonatomic) UIColor *activeTextColor; // 激活状态字体色
  24. - (NSString *)text; /// 获取文本内容
  25. @end
  26. NS_ASSUME_NONNULL_END