//
//  UITextField+Extension.h
//  EZOpenSDKDemo
//
//  Created by JuneCheng on 2021/8/12.
//  Copyright © 2021 hikvision. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UITextField (Extension)

- (void)setPadding:(CGRect)rect;

- (void)setLeftPadding:(CGFloat)leftPadding;

- (void)setBorderWidth:(CGFloat)borderWidth cornerRadius:(CGFloat)cornerRadius borderColor:(UIColor *)borderColor;

/**
 *  textField的代理方法，监听textField的文字改变
 *  textField.text是当前输入字符之前的textField中的text
 *
 *  @param range     当前光标的位置
 *  @param string    当前输入的字符
 *  @param num       小数点后能有几位数
 *
 *  @return 是否允许改变
 */
- (BOOL)shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string numAfterPoint:(int)num;

- (BOOL)shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string numMax:(int)numMax;

@end
