7
7
//
8
8
9
9
#import " TOPasscodeSettingsViewController.h"
10
- #import " TOPasscodeNumberInputView .h"
10
+ #import " TOPasscodeInputField .h"
11
11
#import " TOPasscodeSettingsKeypadView.h"
12
12
#import " TOPasscodeSettingsWarningLabel.h"
13
13
@@ -29,7 +29,7 @@ @interface TOPasscodeSettingsViewController ()
29
29
@property (nonatomic , strong ) UILabel *titleLabel;
30
30
@property (nonatomic , strong ) UILabel *errorLabel;
31
31
@property (nonatomic , strong ) UIButton *optionsButton;
32
- @property (nonatomic , strong ) TOPasscodeNumberInputView *numberInputView;
32
+ @property (nonatomic , strong ) TOPasscodeInputField *numberInputView;
33
33
@property (nonatomic , strong ) TOPasscodeSettingsKeypadView *keypadView;
34
34
@property (nonatomic , strong ) TOPasscodeSettingsWarningLabel *warningLabel;
35
35
@@ -89,7 +89,7 @@ - (void)viewDidLoad {
89
89
[self .containerView addSubview: self .titleLabel];
90
90
91
91
// Create number view
92
- self.numberInputView = [[TOPasscodeNumberInputView alloc ] initWithRequiredLength: 4 ];
92
+ self.numberInputView = [[TOPasscodeInputField alloc ] init ];
93
93
self.numberInputView .tintColor = [UIColor blackColor ];
94
94
self.numberInputView .autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
95
95
self.numberInputView .passcodeCompletedHandler = ^(NSString *passcode) { [weakSelf numberViewDidEnterPasscode: passcode]; };
@@ -180,7 +180,7 @@ - (void)updateContentForState:(TOPasscodeSettingsViewState)state type:(TOPasscod
180
180
181
181
// Change the input view if needed
182
182
if (self.passcodeType < TOPasscodeTypeCustomNumeric) {
183
- self.numberInputView .requiredLength = (self.passcodeType == TOPasscodeTypeSixDigits) ? 6 : 4 ;
183
+ self.numberInputView .fixedLength = (self.passcodeType == TOPasscodeTypeSixDigits) ? 6 : 4 ;
184
184
}
185
185
186
186
// Update text depending on state
@@ -421,9 +421,9 @@ - (void)optionsCodeButtonTapped:(id)sender
421
421
422
422
NSArray *types = @[@(TOPasscodeTypeFourDigits),
423
423
@(TOPasscodeTypeSixDigits),
424
- // @(TOPasscodeTypeCustomNumeric),
425
- // @(TOPasscodeTypeCustomAlphanumeric)
426
- ];
424
+ @(TOPasscodeTypeCustomNumeric),
425
+ @(TOPasscodeTypeCustomAlphanumeric)
426
+ ];
427
427
428
428
429
429
NSArray *titles = @[NSLocalizedString(@" 4-Digit Numeric Code" , @" " ),
0 commit comments