Created
November 25, 2009 20:03
-
-
Save ldandersen/242992 to your computer and use it in GitHub Desktop.
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
CABasicAnimation *positionAnimation = [CABasicAnimation animationWithKeyPath:@"position.x"]; | |
positionAnimation.toValue = [NSNumber numberWithFloat: self.backgroundImageView.layer.position.x - 50.0]; | |
CABasicAnimation *widthAnimation = [CABasicAnimation animationWithKeyPath:@"bounds.size.width"]; | |
widthAnimation.toValue = [NSNumber numberWithFloat: self.backgroundImageView.bounds.size.width + 50.0]; | |
CAAnimationGroup *resizeAnimationGroup = [CAAnimationGroup animation]; | |
resizeAnimationGroup.duration = 0.5; | |
resizeAnimationGroup.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; | |
resizeAnimationGroup.animations = [NSArray arrayWithObjects:positionAnimation, widthAnimation, nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment