@@ -56,40 +56,41 @@ Your class will have to implement the UIPasscodeViewControllerDelegate protocol,
5656 }
5757 }
5858
59- - (BOOL)shouldChangePasscode:(UIPasscodeViewController * )passcodeView panelView:(UIView* )panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
60- {
61- // Clear summary text
62- [[ passcodeView summaryLabel] setText:@""] ;
63-
64- return TRUE;
65- }
66-
67- - (BOOL)didEndPasscodeEditing:(UIPasscodeViewController * )passcodeView panelView:(UIView* )panelView passCode:(NSUInteger)passCode
68- {
69-
70- NSLog(@"END PASSCODE - %d", passCode);
71-
72- if([ panelView tag] == kPasscodePanelOne) {
73- _ passCode = passCode;
74-
75- return ![ passcodeView nextPanel] ;
59+ - (BOOL)shouldChangePasscode:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
60+ {
61+ // Clear summary text
62+ [[passcodeView summaryLabel] setText:@""];
63+
64+ return TRUE;
7665 }
7766
78- if([panelView tag] == kPasscodePanelTwo) {
79- _retryPassCode = passCode;
67+ - (BOOL)didEndPasscodeEditing:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode
68+ {
69+
70+ NSLog(@"END PASSCODE - %d", passCode);
8071
81- if(_retryPassCode != _passCode) {
82- [passcodeView prevPanel];
83- [[passcodeView summaryLabel] setText:@"Passcode did not match. Try again."];
84- return FALSE;
85- } else {
86- [[passcodeView summaryLabel] setText:@"Good boy !"];
72+ if([panelView tag] == kPasscodePanelOne) {
73+ _passCode = passCode;
74+
75+ return ![passcodeView nextPanel];
76+ }
77+
78+ if([panelView tag] == kPasscodePanelTwo) {
79+ _retryPassCode = passCode;
80+
81+ if(_retryPassCode != _passCode) {
82+ [passcodeView prevPanel];
83+ [[passcodeView summaryLabel] setText:@"Passcode did not match. Try again."];
84+ return FALSE;
85+ } else {
86+ [[passcodeView summaryLabel] setText:@"Good boy !"];
87+ }
88+
8789 }
8890
91+ return TRUE;
8992 }
90-
91- return TRUE;
92- }`
93+
9394
9495Class References
9596----------------
0 commit comments