Skip to content

Commit

Permalink
Lots of changes to add hit testing, step labels, a stop button, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Champney authored and Duncan Champney committed Mar 22, 2012
1 parent 74aaeb0 commit e3ea2db
Show file tree
Hide file tree
Showing 12 changed files with 879 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
iCaverns.xcodeproj/project.xcworkspace/xcuserdata/*
23 changes: 19 additions & 4 deletions CA Test iOS new.xcodeproj/project.pbxproj
Expand Up @@ -15,29 +15,37 @@
AE449D0B151A82CE00A71A4C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AE449D0A151A82CE00A71A4C /* AppDelegate.m */; };
AE449D0E151A82CF00A71A4C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AE449D0D151A82CF00A71A4C /* ViewController.m */; };
AE449D11151A82CF00A71A4C /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AE449D0F151A82CF00A71A4C /* ViewController.xib */; };
AE449D18151A830500A71A4C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE449D17151A830500A71A4C /* QuartzCore.framework */; };
AE449D1F151A842500A71A4C /* WareTo_logo_100x77.png in Resources */ = {isa = PBXBuildFile; fileRef = AE449D1E151A842500A71A4C /* WareTo_logo_100x77.png */; };
AE449D22151A862800A71A4C /* TestView.m in Sources */ = {isa = PBXBuildFile; fileRef = AE449D21151A862800A71A4C /* TestView.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
AE449CF6151A82CE00A71A4C /* CA Test iOS new.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CA Test iOS new.app"; sourceTree = BUILT_PRODUCTS_DIR; };
AE449CFA151A82CE00A71A4C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
AE449CFC151A82CE00A71A4C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
AE449CFE151A82CE00A71A4C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
AE449D02151A82CE00A71A4C /* CA Test iOS new-Info.plist */ = {isa = PBXFileReference; path = "CA Test iOS new-Info.plist"; sourceTree = "<group>"; };
AE449D02151A82CE00A71A4C /* CA Test iOS new-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CA Test iOS new-Info.plist"; sourceTree = "<group>"; };
AE449D04151A82CE00A71A4C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AE449D06151A82CE00A71A4C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
AE449D08151A82CE00A71A4C /* CA Test iOS new-Prefix.pch */ = {isa = PBXFileReference; path = "CA Test iOS new-Prefix.pch"; sourceTree = "<group>"; };
AE449D09151A82CE00A71A4C /* AppDelegate.h */ = {isa = PBXFileReference; path = AppDelegate.h; sourceTree = "<group>"; };
AE449D08151A82CE00A71A4C /* CA Test iOS new-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CA Test iOS new-Prefix.pch"; sourceTree = "<group>"; };
AE449D09151A82CE00A71A4C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
AE449D0A151A82CE00A71A4C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
AE449D0C151A82CE00A71A4C /* ViewController.h */ = {isa = PBXFileReference; path = ViewController.h; sourceTree = "<group>"; };
AE449D0C151A82CE00A71A4C /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
AE449D0D151A82CF00A71A4C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
AE449D10151A82CF00A71A4C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = "<group>"; };
AE449D17151A830500A71A4C /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
AE449D1E151A842500A71A4C /* WareTo_logo_100x77.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = WareTo_logo_100x77.png; sourceTree = "<group>"; };
AE449D20151A862800A71A4C /* TestView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestView.h; sourceTree = "<group>"; };
AE449D21151A862800A71A4C /* TestView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestView.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
AE449CF3151A82CE00A71A4C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AE449D18151A830500A71A4C /* QuartzCore.framework in Frameworks */,
AE449CFB151A82CE00A71A4C /* UIKit.framework in Frameworks */,
AE449CFD151A82CE00A71A4C /* Foundation.framework in Frameworks */,
AE449CFF151A82CE00A71A4C /* CoreGraphics.framework in Frameworks */,
Expand Down Expand Up @@ -67,6 +75,7 @@
AE449CF9151A82CE00A71A4C /* Frameworks */ = {
isa = PBXGroup;
children = (
AE449D17151A830500A71A4C /* QuartzCore.framework */,
AE449CFA151A82CE00A71A4C /* UIKit.framework */,
AE449CFC151A82CE00A71A4C /* Foundation.framework */,
AE449CFE151A82CE00A71A4C /* CoreGraphics.framework */,
Expand All @@ -82,6 +91,8 @@
AE449D0C151A82CE00A71A4C /* ViewController.h */,
AE449D0D151A82CF00A71A4C /* ViewController.m */,
AE449D0F151A82CF00A71A4C /* ViewController.xib */,
AE449D20151A862800A71A4C /* TestView.h */,
AE449D21151A862800A71A4C /* TestView.m */,
AE449D01151A82CE00A71A4C /* Supporting Files */,
);
path = "CA Test iOS new";
Expand All @@ -90,6 +101,7 @@
AE449D01151A82CE00A71A4C /* Supporting Files */ = {
isa = PBXGroup;
children = (
AE449D1E151A842500A71A4C /* WareTo_logo_100x77.png */,
AE449D02151A82CE00A71A4C /* CA Test iOS new-Info.plist */,
AE449D03151A82CE00A71A4C /* InfoPlist.strings */,
AE449D06151A82CE00A71A4C /* main.m */,
Expand Down Expand Up @@ -150,6 +162,7 @@
files = (
AE449D05151A82CE00A71A4C /* InfoPlist.strings in Resources */,
AE449D11151A82CF00A71A4C /* ViewController.xib in Resources */,
AE449D1F151A842500A71A4C /* WareTo_logo_100x77.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -163,6 +176,7 @@
AE449D07151A82CE00A71A4C /* main.m in Sources */,
AE449D0B151A82CE00A71A4C /* AppDelegate.m in Sources */,
AE449D0E151A82CF00A71A4C /* ViewController.m in Sources */,
AE449D22151A862800A71A4C /* TestView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -276,6 +290,7 @@
AE449D16151A82CF00A71A4C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
2 changes: 1 addition & 1 deletion CA Test iOS new/AppDelegate.h
Expand Up @@ -3,7 +3,7 @@
// CA Test iOS new
//
// Created by Duncan Champney on 3/21/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
// Copyright (c) 2012 WareTo. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion CA Test iOS new/AppDelegate.m
Expand Up @@ -3,7 +3,7 @@
// CA Test iOS new
//
// Created by Duncan Champney on 3/21/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
// Copyright (c) 2012 WareTo. All rights reserved.
//

#import "AppDelegate.h"
Expand Down
2 changes: 0 additions & 2 deletions CA Test iOS new/CA Test iOS new-Info.plist
Expand Up @@ -34,8 +34,6 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
18 changes: 18 additions & 0 deletions CA Test iOS new/TestView.h
@@ -0,0 +1,18 @@
//
// TestView.h
// CA Test iOS new
//
// Created by Duncan Champney on 3/21/12.
// Copyright (c) 2012 WareTo. All rights reserved.
//

//This is a custom subclass of UIView.
//The only thing it does that's different is to implement the class method +layerClass
//Implementing that method lets you make a view's layer use a different type of CALayer.
//In our case, we make the view's layer a CAShapeLayer so we can install a path into the layer.

#import <UIKit/UIKit.h>

@interface TestView : UIView

@end
31 changes: 31 additions & 0 deletions CA Test iOS new/TestView.m
@@ -0,0 +1,31 @@
//
// TestView.m
// CA Test iOS new
//
// Created by Duncan Champney on 3/21/12.
// Copyright (c) 2012 WareTo. All rights reserved.
//

#import "TestView.h"
#import <QuartzCore/QuartzCore.h>

@implementation TestView


//Tell the system that we want our baking layer to be a CAShapeLayer.
+ (Class)layerClass
{
return [CAShapeLayer class];
}

- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}


@end
26 changes: 24 additions & 2 deletions CA Test iOS new/ViewController.h
@@ -1,13 +1,35 @@
//
// ViewController.h
// CA Test iOS new
// CA Test iOS
//
// Created by Duncan Champney on 3/21/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
// Copyright (c) 2012 WareTo. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^animationCompletionBlock)(void);
#define kAnimationCompletionBlock @"animationCompletionBlock"

@interface ViewController : UIViewController
{
BOOL animationInFlight;

//outlets
__weak IBOutlet UIView *myContainerView;
__weak IBOutlet UIImageView *imageOne;
__weak IBOutlet UIButton *animateButton;
__weak IBOutlet UILabel *animationStepLabel;
__weak IBOutlet UIButton *stopAnimationButton;
__weak IBOutlet UILabel *tapInstructionsLabel;
__weak IBOutlet UIView *animationStepView;
}

@property (nonatomic, weak) IBOutlet UIView *myContainerView;
@property (nonatomic) BOOL animationInFlight;

- (IBAction)doAnimation:(id)sender;
- (IBAction)testViewTapped:(id)sender;
- (IBAction)stopAnimation:(id)sender;

@end

0 comments on commit e3ea2db

Please sign in to comment.