Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created March 3, 2013 03:54
Show Gist options
  • Save C4Code/5074430 to your computer and use it in GitHub Desktop.
Save C4Code/5074430 to your computer and use it in GitHub Desktop.
imageTransition
//
// C4WorkSpace.m
// imageTransition
//
// Created by moi on 13-03-02.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Image *image1, *image2;
}
-(void)setup {
image1 = [C4Image imageNamed:@"C4Table"];
image2 = [C4Image imageNamed:@"C4Sky"];
image1.center = self.canvas.center;
[self.canvas addImage:image1];
[self runMethod:@"transitionToNewImage" afterDelay:1.0f];
}
-(void)transitionToNewImage {
image1.animationDuration = 1.0f;
image1.image = image2;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment