Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
add ipad ui and rename some files for default nib loading
Browse files Browse the repository at this point in the history
  • Loading branch information
calebd committed Jan 4, 2012
1 parent fabe772 commit 8b1e0f7
Show file tree
Hide file tree
Showing 4 changed files with 608 additions and 2 deletions.
8 changes: 8 additions & 0 deletions SampleApp.xcodeproj/project.pbxproj
Expand Up @@ -7,6 +7,7 @@
objects = { objects = {


/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
3B9E653014B4ED1B00A2508F /* GCPINViewController~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B9E652F14B4ED1B00A2508F /* GCPINViewController~ipad.xib */; };
3BE5E65614AD45EE00D8D292 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65514AD45EE00D8D292 /* UIKit.framework */; }; 3BE5E65614AD45EE00D8D292 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65514AD45EE00D8D292 /* UIKit.framework */; };
3BE5E65814AD45EE00D8D292 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65714AD45EE00D8D292 /* Foundation.framework */; }; 3BE5E65814AD45EE00D8D292 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65714AD45EE00D8D292 /* Foundation.framework */; };
3BE5E65A14AD45EE00D8D292 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65914AD45EE00D8D292 /* CoreGraphics.framework */; }; 3BE5E65A14AD45EE00D8D292 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BE5E65914AD45EE00D8D292 /* CoreGraphics.framework */; };
Expand All @@ -23,6 +24,7 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */


/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
3B9E652F14B4ED1B00A2508F /* GCPINViewController~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "GCPINViewController~ipad.xib"; sourceTree = "<group>"; };
3BE5E65114AD45EE00D8D292 /* SampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3BE5E65114AD45EE00D8D292 /* SampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
3BE5E65514AD45EE00D8D292 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 3BE5E65514AD45EE00D8D292 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
3BE5E65714AD45EE00D8D292 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 3BE5E65714AD45EE00D8D292 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -120,6 +122,7 @@
3BE5E67914AD482D00D8D292 /* PINBox.png */, 3BE5E67914AD482D00D8D292 /* PINBox.png */,
3BE5E67A14AD482D00D8D292 /* PINBox@2x.png */, 3BE5E67A14AD482D00D8D292 /* PINBox@2x.png */,
3BE5E67B14AD482D00D8D292 /* GCPINViewController~iphone.xib */, 3BE5E67B14AD482D00D8D292 /* GCPINViewController~iphone.xib */,
3B9E652F14B4ED1B00A2508F /* GCPINViewController~ipad.xib */,
); );
path = pinview; path = pinview;
sourceTree = "<group>"; sourceTree = "<group>";
Expand Down Expand Up @@ -180,6 +183,7 @@
3BE5E67D14AD482D00D8D292 /* PINBox.png in Resources */, 3BE5E67D14AD482D00D8D292 /* PINBox.png in Resources */,
3BE5E67E14AD482D00D8D292 /* PINBox@2x.png in Resources */, 3BE5E67E14AD482D00D8D292 /* PINBox@2x.png in Resources */,
3BE5E67F14AD482D00D8D292 /* GCPINViewController~iphone.xib in Resources */, 3BE5E67F14AD482D00D8D292 /* GCPINViewController~iphone.xib in Resources */,
3B9E653014B4ED1B00A2508F /* GCPINViewController~ipad.xib in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand Down Expand Up @@ -268,7 +272,9 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SampleApp/SampleApp-Prefix.pch"; GCC_PREFIX_HEADER = "SampleApp/SampleApp-Prefix.pch";
INFOPLIST_FILE = "SampleApp/SampleApp-Info.plist"; INFOPLIST_FILE = "SampleApp/SampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
name = Debug; name = Debug;
Expand All @@ -279,7 +285,9 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SampleApp/SampleApp-Prefix.pch"; GCC_PREFIX_HEADER = "SampleApp/SampleApp-Prefix.pch";
INFOPLIST_FILE = "SampleApp/SampleApp-Info.plist"; INFOPLIST_FILE = "SampleApp/SampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
}; };
name = Release; name = Release;
Expand Down
4 changes: 2 additions & 2 deletions SampleApp/SAViewController.m
Expand Up @@ -14,7 +14,7 @@ @implementation SAViewController


- (IBAction)setPIN { - (IBAction)setPIN {
GCPINViewController *PIN = [[GCPINViewController alloc] GCPINViewController *PIN = [[GCPINViewController alloc]
initWithNibName:@"PINViewDefault" initWithNibName:nil
bundle:nil bundle:nil
mode:GCPINViewControllerModeCreate]; mode:GCPINViewControllerModeCreate];
PIN.messageText = @"Enter a passcode"; PIN.messageText = @"Enter a passcode";
Expand All @@ -30,7 +30,7 @@ - (IBAction)setPIN {


- (IBAction)checkPIN { - (IBAction)checkPIN {
GCPINViewController *PIN = [[GCPINViewController alloc] GCPINViewController *PIN = [[GCPINViewController alloc]
initWithNibName:@"PINViewDefault" initWithNibName:nil
bundle:nil bundle:nil
mode:GCPINViewControllerModeVerify]; mode:GCPINViewControllerModeVerify];
PIN.messageText = @"Enter your passcode"; PIN.messageText = @"Enter your passcode";
Expand Down
8 changes: 8 additions & 0 deletions pinview/GCPINViewController.m
Expand Up @@ -167,6 +167,14 @@ - (void)viewDidUnload {
self.labels = nil; self.labels = nil;
self.text = nil; self.text = nil;
} }
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return UIInterfaceOrientationIsLandscape(orientation);
}
else {
return (orientation == UIInterfaceOrientationPortrait);
}
}


#pragma mark - overridden property accessors #pragma mark - overridden property accessors
- (void)setMessageText:(NSString *)text { - (void)setMessageText:(NSString *)text {
Expand Down

0 comments on commit 8b1e0f7

Please sign in to comment.