Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created June 10, 2012 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save C4Code/2907065 to your computer and use it in GitHub Desktop.
Save C4Code/2907065 to your computer and use it in GitHub Desktop.
Apple DTS
#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