Created
March 17, 2012 12:00
-
-
Save mekanics/2058072 to your computer and use it in GitHub Desktop.
UIView Shadow Animation
This file contains hidden or 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
#import <QuartzCore/CAAnimation.h> | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"shadowOpacity"]; | |
animation.fromValue = [NSNumber numberWithFloat:1.0]; | |
animation.toValue = [NSNumber numberWithFloat:0.0]; | |
animation.duration = 1.0; | |
[view.layer addAnimation:animation forKey:@"shadowOpacity"]; | |
view.layer.shadowOpacity = 0.0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment