Skip to content

Commit 960865f

Browse files
committed
Renamed view types
1 parent 3503928 commit 960865f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

TOPasscodeViewController/TOPasscodeSettingsViewController.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import "TOPasscodeSettingsViewController.h"
10-
#import "TOPasscodeNumberInputView.h"
10+
#import "TOPasscodeInputField.h"
1111
#import "TOPasscodeSettingsKeypadView.h"
1212
#import "TOPasscodeSettingsWarningLabel.h"
1313

@@ -29,7 +29,7 @@ @interface TOPasscodeSettingsViewController ()
2929
@property (nonatomic, strong) UILabel *titleLabel;
3030
@property (nonatomic, strong) UILabel *errorLabel;
3131
@property (nonatomic, strong) UIButton *optionsButton;
32-
@property (nonatomic, strong) TOPasscodeNumberInputView *numberInputView;
32+
@property (nonatomic, strong) TOPasscodeInputField *numberInputView;
3333
@property (nonatomic, strong) TOPasscodeSettingsKeypadView *keypadView;
3434
@property (nonatomic, strong) TOPasscodeSettingsWarningLabel *warningLabel;
3535

@@ -89,7 +89,7 @@ - (void)viewDidLoad {
8989
[self.containerView addSubview:self.titleLabel];
9090

9191
// Create number view
92-
self.numberInputView = [[TOPasscodeNumberInputView alloc] initWithRequiredLength:4];
92+
self.numberInputView = [[TOPasscodeInputField alloc] init];
9393
self.numberInputView.tintColor = [UIColor blackColor];
9494
self.numberInputView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
9595
self.numberInputView.passcodeCompletedHandler = ^(NSString *passcode) { [weakSelf numberViewDidEnterPasscode:passcode]; };
@@ -180,7 +180,7 @@ - (void)updateContentForState:(TOPasscodeSettingsViewState)state type:(TOPasscod
180180

181181
// Change the input view if needed
182182
if (self.passcodeType < TOPasscodeTypeCustomNumeric) {
183-
self.numberInputView.requiredLength = (self.passcodeType == TOPasscodeTypeSixDigits) ? 6 : 4;
183+
self.numberInputView.fixedLength = (self.passcodeType == TOPasscodeTypeSixDigits) ? 6 : 4;
184184
}
185185

186186
// Update text depending on state
@@ -421,9 +421,9 @@ - (void)optionsCodeButtonTapped:(id)sender
421421

422422
NSArray *types = @[@(TOPasscodeTypeFourDigits),
423423
@(TOPasscodeTypeSixDigits),
424-
// @(TOPasscodeTypeCustomNumeric),
425-
// @(TOPasscodeTypeCustomAlphanumeric)
426-
];
424+
@(TOPasscodeTypeCustomNumeric),
425+
@(TOPasscodeTypeCustomAlphanumeric)
426+
];
427427

428428

429429
NSArray *titles = @[NSLocalizedString(@"4-Digit Numeric Code", @""),

TOPasscodeViewController/TOPasscodeViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import "TOPasscodeView.h"
1111
#import "TOPasscodeViewControllerAnimatedTransitioning.h"
1212
#import "TOPasscodeKeypadView.h"
13-
#import "TOPasscodeNumberInputView.h"
13+
#import "TOPasscodeInputField.h"
1414

1515
@interface TOPasscodeViewController () <UIViewControllerTransitioningDelegate>
1616

@@ -370,7 +370,7 @@ - (void)setPasscodeType:(TOPasscodeType)passcodeType
370370
{
371371
if (_passcodeType == passcodeType) { return; }
372372
_passcodeType = passcodeType;
373-
self.passcodeView.numberInputView.requiredLength = _passcodeType == TOPasscodeTypeSixDigits ? 6 : 4;
373+
self.passcodeView.numberInputView.fixedLength = _passcodeType == TOPasscodeTypeSixDigits ? 6 : 4;
374374
[self.passcodeView setNeedsLayout];
375375
}
376376

0 commit comments

Comments
 (0)