Created
June 10, 2012 19:37
-
-
Save C4Code/2907065 to your computer and use it in GitHub Desktop.
Apple DTS
This file contains hidden or 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
#import "C4WorkSpace.h" | |
@interface C4WorkSpace () | |
@end | |
@implementation C4WorkSpace { | |
C4Shape *translateRect, *transformRect; | |
} | |
-(void)setup { | |
translateRect = [C4Shape rect:CGRectMake(100, 100, 100,100)]; | |
[self.canvas addShape:translateRect]; | |
transformRect = [C4Shape rect:CGRectMake(100, 300, 100, 100)]; | |
[self.canvas addShape:transformRect]; | |
} | |
-(void)test { | |
translateRect.animationDuration = 1.0f; | |
translateRect.animationOptions = AUTOREVERSE; | |
translateRect.center = CGPointMake(384,150); | |
transformRect.animationDuration = 1.0f; | |
transformRect.animationOptions = AUTOREVERSE; | |
transformRect.transform = CGAffineTransformMakeRotation(QUARTER_PI); | |
} | |
-(void)touchesBegan { | |
[self test]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment