Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added motion detection code and sounds from Warren.
- Loading branch information
Tim Burks
committed
Apr 17, 2010
1 parent
f543d76
commit c24663d
Showing
8 changed files
with
102 additions
and
3 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
Binary file not shown.
Binary file not shown.
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,6 @@ | ||
|
||
@interface Motion : 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,34 @@ | ||
// | ||
// Motion.m | ||
// AcceleratorTest | ||
// | ||
// Created by Warren Stringer on 4/16/10. | ||
// Copyright 2010 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import "Motion.h" | ||
|
||
|
||
@implementation Motion | ||
|
||
// must add [motion becomeFirstResponder] *after* adding this view to view hierarchy | ||
// see MotionAppDelegate | ||
|
||
-(BOOL) canBecomeFirstResponder { | ||
return YES; | ||
} | ||
|
||
-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event { //__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0) | ||
|
||
NSLog(@"%s",_cmd); | ||
} | ||
-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0) | ||
|
||
NSLog(@"%s",_cmd); | ||
} | ||
-(void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event {//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); | ||
|
||
NSLog(@"%s",_cmd); | ||
} | ||
|
||
@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