YJJTextField.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // YJJTextField.h
  3. // YJJTextField
  4. //
  5. // Created by arges on 2017/6/5.
  6. // Copyright © 2017年 ArgesYao. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface YJJTextField : UIView
  10. /** 内容文本框 */
  11. @property (weak, nonatomic) IBOutlet UITextField *textField;
  12. /** 最大字数(必填) */
  13. @property (nonatomic,assign) NSInteger maxLength;
  14. /** 输入内容错误提示(必填) */
  15. @property (nonatomic,strong) NSString *errorStr;
  16. /** 占位文字(必填) */
  17. @property (nonatomic,strong) NSString *placeholder;
  18. /** 保存输入内容的KEY(必填) */
  19. @property (nonatomic,strong) NSString *historyContentKey;
  20. /** 左侧图标名称(有默认图片) */
  21. @property (nonatomic,strong) NSString *leftImageName;
  22. /** 文本字体大小(默认15.0) */
  23. @property (nonatomic,assign) CGFloat textFont;
  24. /** 文本颜色(默认DarkGray) */
  25. @property (nonatomic,strong) UIColor *textColor;
  26. /** 文本字体大小(默认15.0) */
  27. @property (nonatomic,assign) CGFloat placeHolderFont;
  28. /** 文本颜色(默认LightGray) */
  29. @property (nonatomic,strong) UIColor *placeHolderColor;
  30. /** 字数限制文本颜色(默认灰色) */
  31. @property (nonatomic,strong) UIColor *textLengthLabelColor;
  32. /** 上浮的占位文本颜色(默认深绿色) */
  33. @property (nonatomic,strong) UIColor *placeHolderLabelColor;
  34. /** 底部线条默认颜色(默认灰色) */
  35. @property (nonatomic,strong) UIColor *lineDefaultColor;
  36. /** 底部线条选中颜色(默认深绿色) */
  37. @property (nonatomic,strong) UIColor *lineSelectedColor;
  38. /** 底部线条错误警告颜色(默认红色) */
  39. @property (nonatomic,strong) UIColor *lineWarningColor;
  40. /**
  41. 初始化方法
  42. */
  43. //+ (instancetype)yjj_textField;
  44. /**
  45. 上浮占位文字的显示与隐藏
  46. @param isHidden 是否隐藏
  47. */
  48. - (void)setPlaceHolderLabelHidden:(BOOL)isHidden;
  49. /**
  50. 取消历史数据列表
  51. */
  52. - (void)dismissTheHistoryContentTableView;
  53. @end