Skip to content

Commit 03870c4

Browse files
committed
pod 1.3.5
1 parent 64069b6 commit 03870c4

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

JHVerificationCodeView/JHVerificationCodeView/JHVerificationCodeView.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ typedef NS_ENUM(NSUInteger, JHVCConfigInputType) {
7878
@property (nonatomic, strong) UIColor *underLineHighlightedColor;
7979
///自定义的输入占位字符,secureTextEntry = NO,有效
8080
@property (nonatomic, copy) NSString *customInputHolder;
81+
///设置键盘类型
82+
@property (nonatomic, assign) UIKeyboardType keyboardType;
83+
///使用系统的密码键盘
84+
@property (nonatomic, assign) BOOL useSystemPasswordKeyboard;
8185
@end
8286

8387
@interface JHVerificationCodeView : UIView

JHVerificationCodeView/JHVerificationCodeView/JHVerificationCodeView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ - (void)jhSetupViews:(CGRect)frame
181181

182182
_textView = [[UITextView alloc] init];
183183
_textView.frame = CGRectMake(0, CGRectGetHeight(frame), 0, 0);
184-
_textView.secureTextEntry = YES;
184+
_textView.secureTextEntry = _config.useSystemPasswordKeyboard;
185+
_textView.keyboardType = _config.keyboardType;
185186
[self addSubview:_textView];
186187

187188
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(xx_textChange:) name:UITextViewTextDidChangeNotification object:_textView];

JHVerificationCodeView/ViewController.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ - (void)jhSetupViews
6363
config.inputBoxCornerRadius = 5;
6464

6565
config.customInputHolder = @"🔒";
66-
66+
67+
config.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
68+
config.useSystemPasswordKeyboard = YES;
69+
6770
[self.view addSubview:({
6871

6972
UILabel *label = [[UILabel alloc] init];
@@ -109,7 +112,7 @@ - (void)jhSetupViews
109112
config.inputBoxHighlightedColor = [UIColor purpleColor];
110113

111114
config.customInputHolder = @"🈲";
112-
115+
113116
[self.view addSubview:({
114117

115118
UILabel *label = [[UILabel alloc] init];
@@ -154,7 +157,7 @@ - (void)jhSetupViews
154157
config.inputBoxBorderWidth = 1;
155158

156159
config.customInputHolder = @"❄️";
157-
160+
158161
[self.view addSubview:({
159162

160163
UILabel *label = [[UILabel alloc] init];
@@ -201,7 +204,7 @@ - (void)jhSetupViews
201204
config.underLineSize = CGSizeMake(33, 2);
202205
config.underLineColor = [UIColor brownColor];
203206
config.underLineHighlightedColor = [UIColor redColor];
204-
207+
205208
[self.view addSubview:({
206209

207210
UILabel *label = [[UILabel alloc] init];

0 commit comments

Comments
 (0)