糖尿病康复,内容丰富有趣,生活中的好帮手!
糖尿病康复 > 电池管家 动画效果

电池管家 动画效果

时间:2024-07-20 20:40:09

相关推荐

电池管家 动画效果

弹出:

CAKeyframeAnimation *animation = [CAKeyframeAnimationanimationWithKeyPath:@"transform.scale"];

animation.values =@[@(0.01),@(1.2),@(0.9),@(1)];

animation.keyTimes = @[@(0),@(0.4),@(0.6),@(1)];

animation.timingFunctions =@[[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionLinear], [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionLinear], [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseOut]];

animation.duration = 0.5;

animation.delegate = self;

[popImageView1.layer addAnimation:animationforKey:@"bouce"];

点击消失:

CAKeyframeAnimation *animation = [CAKeyframeAnimationanimationWithKeyPath:@"transform.scale"];

animation.values = @[@(1),@(1.2),@(0.01)];

animation.keyTimes = @[@(0),@(0.4),@(1)];

animation.timingFunctions =@[[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseInEaseOut], [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseOut]];

animation.duration = 0.35;

animation.delegate = self;

[button.superview.layeraddAnimation:animationforKey:@"bounce"];

button.superview.transform =CGAffineTransformMakeScale(0.001,0.001);

若要区分动画,则可以这样 (已测 可以达到效果chenyong) 0122 (这样貌似也有点问题,偶尔会崩溃好像,可以设置一个全局int值 ,来区分动画)

[animation setValue:@"throbUp" forKey:@"animationID"];

转载自:/questions/1255086/how-to-identify-caanimation-within-the-animationdidstop-delegate

如果觉得《电池管家 动画效果》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。