File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
TOPasscodeViewControllerExample Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ - (void)updateContentForState:(TOPasscodeSettingsViewState)state type:(TOPasscod
211
211
switch (state) {
212
212
case TOPasscodeSettingsViewStateEnterCurrentPassword:
213
213
self.titleLabel .text = NSLocalizedString(@" Enter your passcode" , @" " );
214
- self.navigationItem .rightBarButtonItem = nil ;
214
+ self.navigationItem .rightBarButtonItem = variableSizePasscode ? self. nextBarButtonItem : nil ;
215
215
break ;
216
216
case TOPasscodeSettingsViewStateEnterNewPassword:
217
217
self.titleLabel .text = NSLocalizedString(@" Enter a new passcode" , @" " );
@@ -532,12 +532,12 @@ - (void)optionsCodeButtonTapped:(id)sender
532
532
533
533
- (void )nextButtonTapped:(id )sender
534
534
{
535
- [self transitionToState: TOPasscodeSettingsViewStateConfirmNewPassword animated: YES ];
535
+ [self inputViewDidCompletePasscode: self .inputField.passcode ];
536
536
}
537
537
538
538
- (void )doneButtonTapped:(id )sender
539
539
{
540
- [self confirmNewPasscode :self .inputField.passcode];
540
+ [self inputViewDidCompletePasscode :self .inputField.passcode];
541
541
}
542
542
543
543
#pragma mark - Accessors -
Original file line number Diff line number Diff line change 12
12
@interface SettingsViewController : UITableViewController
13
13
14
14
@property (nonatomic , copy ) NSString *passcode;
15
+ @property (nonatomic , assign ) TOPasscodeType passcodeType;
15
16
@property (nonatomic , assign ) TOPasscodeViewStyle style;
16
17
@property (nonatomic , strong ) UIImage *wallpaperImage;
17
18
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ - (BOOL)passcodeSettingsViewController:(TOPasscodeSettingsViewController *)passc
61
61
- (void )passcodeSettingsViewController : (TOPasscodeSettingsViewController *)passcodeSettingsViewController didChangeToNewPasscode : (NSString *)passcode ofType : (TOPasscodeType)type
62
62
{
63
63
self.passcode = passcode;
64
+ self.passcodeType = type;
64
65
[self .tableView reloadSections: [NSIndexSet indexSetWithIndex: 0 ] withRowAnimation: UITableViewRowAnimationNone];
65
66
[self .navigationController popViewControllerAnimated: YES ];
66
67
}
@@ -148,6 +149,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
148
149
}
149
150
else if (indexPath.section == 0 ) {
150
151
TOPasscodeSettingsViewController *settingsController = [[TOPasscodeSettingsViewController alloc ] init ];
152
+ settingsController.passcodeType = self.passcodeType ;
151
153
settingsController.delegate = self;
152
154
settingsController.requireCurrentPasscode = YES ;
153
155
[self .navigationController pushViewController: settingsController animated: YES ];
You can’t perform that action at this time.
0 commit comments