Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 380c30d

Browse files
committed
Rename project => PTPasscodeViewController
1 parent d39ad55 commit 380c30d

File tree

12 files changed

+348
-317
lines changed

12 files changed

+348
-317
lines changed

UIPasscodeViewControllerDemo/Classes/UIPasscodeViewController.h renamed to PTPasscodeViewControllerDemo/Classes/PTPasscodeViewController.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RootViewController.h
3-
// UIPasscodeViewControllerDemo
3+
// PTPasscodeViewControllerDemo
44
//
55
// Created by Lasha Dolidze on 7/7/10.
66
// Copyright Picktek LLC 2010. All rights reserved.
@@ -29,7 +29,7 @@
2929
@protocol PasscodeViewControllerDelegate;
3030

3131

32-
@interface UIPasscodeViewController : UITableViewController <UITextFieldDelegate> {
32+
@interface PTPasscodeViewController : UITableViewController <UITextFieldDelegate> {
3333

3434
UIView *_scrollView;
3535
UIView *currentPanel;
@@ -52,8 +52,8 @@
5252

5353
@protocol PasscodeViewControllerDelegate <NSObject>
5454
@optional
55-
- (BOOL)shouldChangePasscode:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
56-
- (void)didShowPasscodePanel:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView;
57-
- (BOOL)didEndPasscodeEditing:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode;
55+
- (BOOL)shouldChangePasscode:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
56+
- (void)didShowPasscodePanel:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView;
57+
- (BOOL)didEndPasscodeEditing:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView passCode:(NSUInteger)passCode;
5858

5959
@end

UIPasscodeViewControllerDemo/Classes/UIPasscodeViewController.m renamed to PTPasscodeViewControllerDemo/Classes/PTPasscodeViewController.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
//
22
// RootViewController.m
3-
// UIPasscodeViewControllerDemo
3+
// PTPasscodeViewControllerDemo
44
//
55
// Created by Lasha Dolidze on 7/7/10.
66
// Copyright Picktek LLC 2010. All rights reserved.
77
//
88

9-
#import "UIPasscodeViewController.h"
9+
#import "PTPasscodeViewController.h"
1010

1111
///////////////////////////////////////////////////////////////////////////////////
1212
// Private Methods
13-
@interface UIPasscodeViewController (Private)
13+
@interface PTPasscodeViewController (Private)
1414
- (UITextField*) createPasscodeEntry:(CGRect)textFieldFrame tag:(NSInteger)tag;
1515
- (UIView*) createPanel:(CGRect)rect tagIndex:(NSInteger)tagIndex;
1616
- (void) switchPanel:(NSInteger)panelTag;
1717
@end
1818

19-
@implementation UIPasscodeViewController
19+
@implementation PTPasscodeViewController
2020

2121
@synthesize currentPanel;
2222
@synthesize delegate = _delegate;

UIPasscodeViewControllerDemo/Classes/UIPasscodeViewControllerDemoAppDelegate.h renamed to PTPasscodeViewControllerDemo/Classes/PTPasscodeViewControllerDemoAppDelegate.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
//
2-
// UIPasscodeViewControllerDemoAppDelegate.h
3-
// UIPasscodeViewControllerDemo
2+
// PTPasscodeViewControllerDemoAppDelegate.h
3+
// PTPasscodeViewControllerDemo
44
//
55
// Created by Lasha Dolidze on 7/7/10.
66
// Copyright Picktek LLC 2010. All rights reserved.
77
//
88

99
#import <UIKit/UIKit.h>
10-
#import "UIPasscodeViewController.h"
10+
#import "PTPasscodeViewController.h"
1111

12-
@interface UIPasscodeViewControllerDemoAppDelegate : NSObject <UIApplicationDelegate,PasscodeViewControllerDelegate> {
12+
@interface PTPasscodeViewControllerDemoAppDelegate : NSObject <UIApplicationDelegate,PasscodeViewControllerDelegate> {
1313

1414
UIWindow *_window;
1515
UINavigationController *_navigationController;

UIPasscodeViewControllerDemo/Classes/UIPasscodeViewControllerDemoAppDelegate.m renamed to PTPasscodeViewControllerDemo/Classes/PTPasscodeViewControllerDemoAppDelegate.m

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//
2-
// UIPasscodeViewControllerDemoAppDelegate.m
3-
// UIPasscodeViewControllerDemo
2+
// PTPasscodeViewControllerDemoAppDelegate.m
3+
// PTPasscodeViewControllerDemo
44
//
55
// Created by Lasha Dolidze on 7/7/10.
66
// Copyright Picktek LLC 2010. All rights reserved.
77
//
88

9-
#import "UIPasscodeViewControllerDemoAppDelegate.h"
10-
#import "UIPasscodeViewController.h"
9+
#import "PTPasscodeViewControllerDemoAppDelegate.h"
10+
#import "PTPasscodeViewController.h"
1111

1212

13-
@implementation UIPasscodeViewControllerDemoAppDelegate
13+
@implementation PTPasscodeViewControllerDemoAppDelegate
1414

1515
@synthesize window = _window;
1616
@synthesize navigationController = _navigationController;
@@ -29,15 +29,15 @@ - (void)dealloc
2929
#pragma mark -
3030
#pragma mark Application lifecycle
3131

32-
- (void)applicationDidFinishLaunching:(UIApplication *)application
32+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
3333
{
3434

3535
CGRect rect = [[UIScreen mainScreen] bounds];
3636
UIWindow *window = [[UIWindow alloc] initWithFrame:rect];
3737
[self setWindow:window];
3838

3939

40-
UIPasscodeViewController *passcodeViewController = [[UIPasscodeViewController alloc] initWithDelegate:self];
40+
PTPasscodeViewController *passcodeViewController = [[PTPasscodeViewController alloc] initWithDelegate:self];
4141

4242
UINavigationController *navController = [[UINavigationController alloc]
4343
initWithRootViewController:passcodeViewController];
@@ -49,6 +49,8 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application
4949

5050
[window release];
5151
[navController release];
52+
53+
return TRUE;
5254
}
5355

5456

@@ -57,32 +59,32 @@ - (void)applicationWillTerminate:(UIApplication *)application {
5759
}
5860

5961

60-
- (void) didShowPasscodePanel:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView
62+
- (void) didShowPasscodePanel:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView
6163
{
62-
[passcodeView setTitle:@"Set Passcode"];
64+
[passcodeViewController setTitle:@"Set Passcode"];
6365

6466
if([panelView tag] == kPasscodePanelOne) {
65-
[[passcodeView titleLabel] setText:@"Enter a passcode"];
67+
[[passcodeViewController titleLabel] setText:@"Enter a passcode"];
6668
}
6769

6870
if([panelView tag] == kPasscodePanelTwo) {
69-
[[passcodeView titleLabel] setText:@"Re-enter your passcode"];
71+
[[passcodeViewController titleLabel] setText:@"Re-enter your passcode"];
7072
}
7173

7274
if([panelView tag] == kPasscodePanelThree) {
73-
[[passcodeView titleLabel] setText:@"Panel 3"];
75+
[[passcodeViewController titleLabel] setText:@"Panel 3"];
7476
}
7577
}
7678

77-
- (BOOL)shouldChangePasscode:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
79+
- (BOOL)shouldChangePasscode:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView passCode:(NSUInteger)passCode lastNumber:(NSInteger)lastNumber;
7880
{
7981
// Clear summary text
80-
[[passcodeView summaryLabel] setText:@""];
82+
[[passcodeViewController summaryLabel] setText:@""];
8183

8284
return TRUE;
8385
}
8486

85-
- (BOOL)didEndPasscodeEditing:(UIPasscodeViewController *)passcodeView panelView:(UIView*)panelView passCode:(NSUInteger)passCode
87+
- (BOOL)didEndPasscodeEditing:(PTPasscodeViewController *)passcodeViewController panelView:(UIView*)panelView passCode:(NSUInteger)passCode
8688
{
8789

8890
NSLog(@"END PASSCODE - %d", passCode);
@@ -98,18 +100,18 @@ - (BOOL)didEndPasscodeEditing:(UIPasscodeViewController *)passcodeView panelView
98100
return FALSE;
99101
}
100102
*/
101-
return ![passcodeView nextPanel];
103+
return ![passcodeViewController nextPanel];
102104
}
103105

104106
if([panelView tag] == kPasscodePanelTwo) {
105107
_retryPassCode = passCode;
106108

107109
if(_retryPassCode != _passCode) {
108-
[passcodeView prevPanel];
109-
[[passcodeView summaryLabel] setText:@"Passcode did not match. Try again."];
110+
[passcodeViewController prevPanel];
111+
[[passcodeViewController summaryLabel] setText:@"Passcode did not match. Try again."];
110112
return FALSE;
111113
} else {
112-
[[passcodeView summaryLabel] setText:@"Good boy !"];
114+
[[passcodeViewController summaryLabel] setText:@"Good boy !"];
113115
}
114116

115117
}

0 commit comments

Comments
 (0)