短信验证码输入控件
/**
验证码长度 默认6位
*/
@property (nonatomic, assign) IBInspectable int CodeCount;
/**
验证码边框颜色
*/
@property (nonatomic, strong) IBInspectable UIColor *normalColor;
/**
验证码边框高亮颜色
*/
@property (nonatomic, strong) IBInspectable UIColor *highlightColor;
/**
验证码光标颜色 默认与normalColor一致
FieldBorderTypeNone时 默认无光标,可单独设置
*/
@property (nonatomic, strong) IBInspectable UIColor *cursorColor;
/**
验证码字符颜色 默认黑色
*/
@property (nonatomic, strong) IBInspectable UIColor *codeColor;
/**
验证码字体大小 默认26
*/
@property (nonatomic, assign) IBInspectable CGFloat fontSize;
/**
验证码控件风格
*/
@property (nonatomic, assign) IBInspectable FieldBorderType fieldBorderType;
/**
FieldBorderTypeNone时的验证码间距 默认为10
*/
@property (nonatomic, assign) IBInspectable CGFloat margin;
/**
类方法 创建一个TTVerifyCodeView
@param type BorderType
@param normalColor normalColor
@param highlightColor highlightColor
@return TTVerifyCodeView
*/
+ (instancetype)verifyCodeViewBorderType:(FieldBorderType)type NormalColor:(UIColor *)normalColor HighlightColor:(UIColor *)highlightColor;
/**
创建一个Default风格的TTVerifyCodeView
*/
+ (instancetype)verifyCodeViewBorderTypeDefaultNormalColor:(UIColor *)normalColor HighlightColor:(UIColor *)highlightColor CursorColor:(UIColor *)cursorColor CodeColor:(UIColor *)codeColor;
/**
创建一个Highlight风格的TTVerifyCodeView
*/
+ (instancetype)verifyCodeViewBorderTypeHighlightNormalColor:(UIColor *)normalColor HighlightColor:(UIColor *)highlightColor CursorColor:(UIColor *)cursorColor CodeColor:(UIColor *)codeColor;
/**
创建一个None风格的TTVerifyCodeView
*/
+ (instancetype)verifyCodeViewBorderTypeNoneNormalColor:(UIColor *)normalColor CursorColor:(UIColor *)cursorColor CodeColor:(UIColor *)codeColor Margin:(CGFloat)margin;
- 支持各属性设置
- type属性需要手动增加keypath,使用数字进行对应枚举值的设置