Skip to content

Commit b979328

Browse files
committed
Update UI to match iOS 7+ styling
1 parent f4a915b commit b979328

12 files changed

Lines changed: 164 additions & 167 deletions

‎Assets/papasscode_background.png‎

-1.24 KB
Binary file not shown.
-1.57 KB
Binary file not shown.

‎Assets/papasscode_failed_bg.png‎

-1.49 KB
Binary file not shown.

‎Assets/papasscode_failed_bg@2x.png‎

-2.42 KB
Binary file not shown.

‎Assets/papasscode_marker.png‎

-1.04 KB
Binary file not shown.

‎Assets/papasscode_marker@2x.png‎

-1.22 KB
Binary file not shown.

‎PAPasscode Example/PAPasscode Example.xcodeproj/project.pbxproj‎

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@
2121
9208C478162C547900D7B1F7 /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9208C476162C547900D7B1F7 /* ViewController_iPad.xib */; };
2222
92471367162CB60D0085CDA3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92471366162CB60D0085CDA3 /* QuartzCore.framework */; };
2323
92471370162CCA890085CDA3 /* PAPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9247136F162CCA890085CDA3 /* PAPasscodeViewController.m */; };
24-
92471377162CCAB30085CDA3 /* papasscode_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471371162CCAB30085CDA3 /* papasscode_background.png */; };
25-
92471378162CCAB30085CDA3 /* papasscode_background@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471372162CCAB30085CDA3 /* papasscode_background@2x.png */; };
26-
92471379162CCAB30085CDA3 /* papasscode_failed_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471373162CCAB30085CDA3 /* papasscode_failed_bg.png */; };
27-
9247137A162CCAB30085CDA3 /* papasscode_failed_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471374162CCAB30085CDA3 /* papasscode_failed_bg@2x.png */; };
28-
9247137B162CCAB30085CDA3 /* papasscode_marker.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471375162CCAB30085CDA3 /* papasscode_marker.png */; };
29-
9247137C162CCAB30085CDA3 /* papasscode_marker@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 92471376162CCAB30085CDA3 /* papasscode_marker@2x.png */; };
24+
927AF85D1B0CE32E009CE2B1 /* PAPlaceholderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 927AF85C1B0CE32E009CE2B1 /* PAPlaceholderView.m */; };
3025
/* End PBXBuildFile section */
3126

3227
/* Begin PBXFileReference section */
@@ -51,12 +46,8 @@
5146
92471366162CB60D0085CDA3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
5247
9247136E162CCA890085CDA3 /* PAPasscodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PAPasscodeViewController.h; path = ../../PAPasscode/PAPasscodeViewController.h; sourceTree = "<group>"; };
5348
9247136F162CCA890085CDA3 /* PAPasscodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PAPasscodeViewController.m; path = ../../PAPasscode/PAPasscodeViewController.m; sourceTree = "<group>"; };
54-
92471371162CCAB30085CDA3 /* papasscode_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = papasscode_background.png; path = ../../Assets/papasscode_background.png; sourceTree = "<group>"; };
55-
92471372162CCAB30085CDA3 /* papasscode_background@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "papasscode_background@2x.png"; path = "../../Assets/papasscode_background@2x.png"; sourceTree = "<group>"; };
56-
92471373162CCAB30085CDA3 /* papasscode_failed_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = papasscode_failed_bg.png; path = ../../Assets/papasscode_failed_bg.png; sourceTree = "<group>"; };
57-
92471374162CCAB30085CDA3 /* papasscode_failed_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "papasscode_failed_bg@2x.png"; path = "../../Assets/papasscode_failed_bg@2x.png"; sourceTree = "<group>"; };
58-
92471375162CCAB30085CDA3 /* papasscode_marker.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = papasscode_marker.png; path = ../../Assets/papasscode_marker.png; sourceTree = "<group>"; };
59-
92471376162CCAB30085CDA3 /* papasscode_marker@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "papasscode_marker@2x.png"; path = "../../Assets/papasscode_marker@2x.png"; sourceTree = "<group>"; };
49+
927AF85B1B0CE32E009CE2B1 /* PAPlaceholderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PAPlaceholderView.h; path = ../../../PAPlaceholder/PAPlaceholder/PAPlaceholderView.h; sourceTree = "<group>"; };
50+
927AF85C1B0CE32E009CE2B1 /* PAPlaceholderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PAPlaceholderView.m; path = ../../../PAPlaceholder/PAPlaceholder/PAPlaceholderView.m; sourceTree = "<group>"; };
6051
/* End PBXFileReference section */
6152

6253
/* Begin PBXFrameworksBuildPhase section */
@@ -106,6 +97,8 @@
10697
9208C45E162C547900D7B1F7 /* PAPasscode Example */ = {
10798
isa = PBXGroup;
10899
children = (
100+
927AF85B1B0CE32E009CE2B1 /* PAPlaceholderView.h */,
101+
927AF85C1B0CE32E009CE2B1 /* PAPlaceholderView.m */,
109102
9247136D162CCA6F0085CDA3 /* PAPasscode */,
110103
9208C467162C547900D7B1F7 /* AppDelegate.h */,
111104
9208C468162C547900D7B1F7 /* AppDelegate.m */,
@@ -135,12 +128,6 @@
135128
9247136D162CCA6F0085CDA3 /* PAPasscode */ = {
136129
isa = PBXGroup;
137130
children = (
138-
92471371162CCAB30085CDA3 /* papasscode_background.png */,
139-
92471372162CCAB30085CDA3 /* papasscode_background@2x.png */,
140-
92471373162CCAB30085CDA3 /* papasscode_failed_bg.png */,
141-
92471374162CCAB30085CDA3 /* papasscode_failed_bg@2x.png */,
142-
92471375162CCAB30085CDA3 /* papasscode_marker.png */,
143-
92471376162CCAB30085CDA3 /* papasscode_marker@2x.png */,
144131
9247136E162CCA890085CDA3 /* PAPasscodeViewController.h */,
145132
9247136F162CCA890085CDA3 /* PAPasscodeViewController.m */,
146133
);
@@ -204,12 +191,6 @@
204191
9208C46F162C547900D7B1F7 /* Default-568h@2x.png in Resources */,
205192
9208C475162C547900D7B1F7 /* ViewController_iPhone.xib in Resources */,
206193
9208C478162C547900D7B1F7 /* ViewController_iPad.xib in Resources */,
207-
92471377162CCAB30085CDA3 /* papasscode_background.png in Resources */,
208-
92471378162CCAB30085CDA3 /* papasscode_background@2x.png in Resources */,
209-
92471379162CCAB30085CDA3 /* papasscode_failed_bg.png in Resources */,
210-
9247137A162CCAB30085CDA3 /* papasscode_failed_bg@2x.png in Resources */,
211-
9247137B162CCAB30085CDA3 /* papasscode_marker.png in Resources */,
212-
9247137C162CCAB30085CDA3 /* papasscode_marker@2x.png in Resources */,
213194
);
214195
runOnlyForDeploymentPostprocessing = 0;
215196
};
@@ -222,6 +203,7 @@
222203
files = (
223204
9208C465162C547900D7B1F7 /* main.m in Sources */,
224205
9208C469162C547900D7B1F7 /* AppDelegate.m in Sources */,
206+
927AF85D1B0CE32E009CE2B1 /* PAPlaceholderView.m in Sources */,
225207
9208C472162C547900D7B1F7 /* ViewController.m in Sources */,
226208
92471370162CCA890085CDA3 /* PAPasscodeViewController.m in Sources */,
227209
);

‎PAPasscode Example/PAPasscode Example/ViewController.m‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ - (IBAction)setPasscode:(id)sender {
2121
}
2222
passcodeViewController.delegate = self;
2323
passcodeViewController.simple = _simpleSwitch.on;
24-
[self presentViewController:passcodeViewController animated:YES completion:nil];
24+
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:passcodeViewController] animated:YES completion:nil];
2525
}
2626

2727
- (IBAction)enterPasscode:(id)sender {
@@ -33,7 +33,7 @@ - (IBAction)enterPasscode:(id)sender {
3333
passcodeViewController.passcode = _passcodeLabel.text;
3434
passcodeViewController.alternativePasscode = @"9999";
3535
passcodeViewController.simple = _simpleSwitch.on;
36-
[self presentViewController:passcodeViewController animated:YES completion:nil];
36+
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:passcodeViewController] animated:YES completion:nil];
3737
}
3838

3939
- (IBAction)changePasscode:(id)sender {
@@ -44,7 +44,7 @@ - (IBAction)changePasscode:(id)sender {
4444
passcodeViewController.delegate = self;
4545
passcodeViewController.passcode = _passcodeLabel.text;
4646
passcodeViewController.simple = _simpleSwitch.on;
47-
[self presentViewController:passcodeViewController animated:YES completion:nil];
47+
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:passcodeViewController] animated:YES completion:nil];
4848
}
4949

5050
#pragma mark - PAPasscodeViewControllerDelegate

‎PAPasscode.podspec‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
Pod::Spec.new do |s|
22
s.name = 'PAPasscode'
3-
s.version = '0.2'
3+
s.version = '1.0'
44
s.summary = 'A Passcode View Controller for iOS similar to the one in Settings.app'
55
s.homepage = 'https://github.com/dhennessy/PAPasscode'
66
s.authors = { 'Denis Hennessy' => 'denis@hennessynet.com' }
77
s.source = { :git => 'https://github.com/dhennessy/PAPasscode.git', :tag => s.version.to_s }
8-
s.platform = :ios
8+
s.platform = :ios, '7.0'
99
s.requires_arc = true
1010

1111
s.source_files = 'PAPasscode'
12-
s.resources = 'Assets/*.png'
1312
s.framework = 'QuartzCore'
1413
end

‎PAPasscode/PAPasscodeViewController.h‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ typedef enum {
3030
@end
3131

3232
@interface PAPasscodeViewController : UIViewController {
33+
NSArray *_installedConstraints;
34+
UIView *_inputPanel;
35+
NSLayoutConstraint *_keyboardHeightConstraint;
3336
UIView *contentView;
3437
NSInteger phase;
3538
UILabel *promptLabel;
3639
UILabel *messageLabel;
37-
UIImageView *failedImageView;
40+
UIView *_failedAttemptsView;
3841
UILabel *failedAttemptsLabel;
3942
UITextField *passcodeTextField;
40-
UIImageView *digitImageViews[4];
43+
UILabel *_digitLabels[4];
4144
UIImageView *snapshotImageView;
4245
}
4346

0 commit comments

Comments
 (0)