实现UImagview渐变然后隐藏。
代码:
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"opacity"];
theAnimation.duration=1.0;
theAnimation.fromValue=[NSNumber numberWithFloat:1.0];
theAnimation.toValue=[NSNumber numberWithFloat:0.0];
[flowerImageView.layer addAnimation:theAnimation forKey:@"animateOpacity"];
没实现等到值成为0.0时,imageView就完全隐藏起来。