Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of changes to add hit testing, step labels, a stop button, etc.
- Loading branch information
Duncan Champney
authored and
Duncan Champney
committed
Mar 22, 2012
1 parent
74aaeb0
commit e3ea2db
Showing
12 changed files
with
879 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
iCaverns.xcodeproj/project.xcworkspace/xcuserdata/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.