Created
August 15, 2013 01:13
-
-
Save fannheyward/6237405 to your computer and use it in GitHub Desktop.
popAnimation like UIAlertView. via http://xcodev.com/761.html
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
CAKeyframeAnimation *popAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; | |
popAnimation.duration = 0.4; | |
popAnimation.values = @[[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.01f, 0.01f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1f, 1.1f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9f, 0.9f, 1.0f)], | |
[NSValue valueWithCATransform3D:CATransform3DIdentity]]; | |
popAnimation.keyTimes = @[@0.0f, @0.5f, @0.75f, @1.0f]; | |
popAnimation.timingFunctions = @[[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut], | |
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut], | |
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; | |
[anAlertAnimationView.layer addAnimation:popAnimation forKey:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment