Created
November 16, 2010 20:31
-
-
Save madebyjeffrey/702452 to your computer and use it in GitHub Desktop.
Adapting an example, doesn't work fully yet
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
- (void) present | |
{ | |
CABasicAnimation *a; | |
a = [CABasicAnimation animationWithKeyPath: @"transform.scale"]; | |
a.duration = 6; | |
a.repeatCount = 0; | |
a.autoreverses = NO; | |
a.fromValue = [NSNumber numberWithFloat: 0]; | |
a.toValue = [NSNumber numberWithFloat: 1.2]; | |
a.removedOnCompletion = YES; | |
a.delegate = self; | |
[self addAnimation: a forKey: @"firstScale"]; | |
NSLog(@"Intro scale"); | |
} | |
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag | |
{ | |
if (theAnimation == [self animationForKey: @"firstScale"]) | |
{ | |
NSLog(@"End of first scale"); | |
CABasicAnimation *a; | |
a = [CABasicAnimation animationWithKeyPath: @"transform.scale"]; | |
a.duration = 2; | |
a.repeatCount = 0; | |
a.autoreverses = NO; | |
a.fromValue = [NSNumber numberWithFloat: 1.2]; | |
a.toValue = [NSNumber numberWithFloat: 1.0]; | |
a.removedOnCompletion = YES; | |
a.delegate = self; | |
[self addAnimation: a forKey: @"endScale"]; | |
NSLog(@"Scaling finished"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment