//设置透明度变化 alpha 0~1 透明~不透明
self.imageView.alpha = 0;
//透明度变化,从 0.8 ~ 0.2
CABasicAnimation *opacityAnimation =[CABasicAnimation animationWithKeyPath:@"opacity"];
opacityAnimation.fromValue = @(0.8);
opacityAnimation.toValue = @(0.2);
//设置透明度变化 alpha 0~1 透明~不透明
self.imageView.alpha = 0;
//透明度变化,从 0.8 ~ 0.2
CABasicAnimation *opacityAnimation =[CABasicAnimation animationWithKeyPath:@"opacity"];
opacityAnimation.fromValue = @(0.8);
opacityAnimation.toValue = @(0.2);