Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created May 12, 2012 16:26
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/2667444 to your computer and use it in GitHub Desktop.
Save C4Code/2667444 to your computer and use it in GitHub Desktop.
how to make a C4Image animate to black and white
#import "C4WorkSpace.h"
C4Image *myImage;
@implementation C4WorkSpace
-(void)setup {
myImage = [C4Image imageNamed:@"C4Sky.png"];
myImage.center = CGPointMake(384, 512);
[self.canvas addImage:myImage];
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
myImage.animationDuration = 2.0f;
[myImage colorControlSaturation:0 brightness:0 contrast:1];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment