-
Notifications
You must be signed in to change notification settings - Fork 1
/
ZZRTextView.h
43 lines (29 loc) · 1.28 KB
/
ZZRTextView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// ZZRTextView.h
// ZZRAuthCodeEnterTextView
//
// Created by 张忠瑞 on 2018/4/12.
// Copyright © 2018年 张忠瑞. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^TextDidFinished)(NSString *codeStr);
@protocol ZZRTextViewDelegate <NSObject>
@optional
- (void)ZZRTextViewDidFinishedEdit:(NSString *)codeStr;
@end
@interface ZZRTextView : UIView<ZZRTextViewDelegate>
@property (nonatomic ,copy) TextDidFinished textFinished; //完成输入的block
@property (nonatomic ,weak) id<ZZRTextViewDelegate> delegate; //完成输入的delegate
- (instancetype)initWithFrame:(CGRect)frame CodeSize:(CGSize)size MaxCount:(NSInteger)maxCount;
//设置边框
- (void)setUpBorderWithNormalBorderColor:(UIColor *)normalBorderColor
HighlightBorderColor:(UIColor *)highlightBorderColor
BorderWidth:(CGFloat)borderColor
BorderCornerRadius:(CGFloat)borderCornerRadius;
//设置字体
- (void)setUpTextWithNormalTextColor:(UIColor *)normalTextColor
HighlightTextColor:(UIColor *)highlightColor
TextFont:(UIFont *)textFont
TextAlignment:(NSTextAlignment)alignment
KeyboardType:(UIKeyboardType)keyboardType;
@end