Created
September 28, 2015 00:29
-
-
Save AlexanderBollbach/e4ded39a0a49a869aa29 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
- (void)flare { | |
CABasicAnimation *colorAnimation2 = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; | |
colorAnimation2.fromValue = @0; | |
colorAnimation2.toValue = @1; | |
colorAnimation2.duration = 0.05; | |
[self.connectLayer addAnimation:colorAnimation2 forKey:nil]; | |
CABasicAnimation *bgFlash = [CABasicAnimation animationWithKeyPath:@"backgroundColor"]; | |
bgFlash.fromValue = (id)self.orbLayerBase.backgroundColor; | |
bgFlash.toValue = (id)[UIColor whiteColor].CGColor; | |
bgFlash.duration = 0.05; | |
[self.orbLayerBase addAnimation:bgFlash forKey:nil]; | |
CABasicAnimation *shadow = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; | |
shadow.fromValue = @0; | |
shadow.toValue = @10; | |
shadow.duration = 0.45; | |
[self.orbLayerBase addAnimation:shadow forKey:nil]; | |
CABasicAnimation *shadow2 = [CABasicAnimation animationWithKeyPath:@"shadowOpacity"]; | |
shadow2.fromValue = @0.3; | |
shadow2.toValue = @0; | |
shadow2.duration = 0.8; | |
[self.orbLayerBase addAnimation:shadow2 forKey:nil]; | |
self.orbLayerBase.shadowRadius = 40; | |
self.orbLayerBase.shadowColor = [UIColor whiteColor].CGColor; | |
CABasicAnimation *colorAnimation3 = [CABasicAnimation animationWithKeyPath:@"lineWidth"]; | |
colorAnimation3.fromValue = @12; | |
colorAnimation3.toValue = @0; | |
colorAnimation3.duration = 0.2; | |
[self.connectLayer addAnimation:colorAnimation3 forKey:nil]; | |
CABasicAnimation *colorAnimation4 = [CABasicAnimation animationWithKeyPath:@"strokeColor"]; | |
colorAnimation4.fromValue = (id)[UIColor blueColor].CGColor; | |
colorAnimation4.toValue = (id)[UIColor whiteColor].CGColor; | |
colorAnimation4.duration = 0.2; | |
[self.connectLayer addAnimation:colorAnimation4 forKey:nil]; | |
CABasicAnimation *colorAnimation5 = [CABasicAnimation animationWithKeyPath:@"lineWidth"]; | |
colorAnimation5.fromValue =@0; | |
colorAnimation5.toValue = @5; | |
colorAnimation5.duration = 0.1; | |
[self.orbLayerBase addAnimation:colorAnimation5 forKey:nil]; | |
CABasicAnimation *colorAnimation6 = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; | |
colorAnimation6.fromValue =@1.3; | |
colorAnimation6.toValue = @1; | |
colorAnimation6.duration = 0.1; | |
[self.orbLayerBase addAnimation:colorAnimation6 forKey:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment