Why does this CAKeyFrameAnimation stop with zero opacity?
问题 I have this code. At the end of the values array, you can see I provide 0.5 for the opacity. But for some reason, when the animation stops, it flashes once again and then leaves the view completely transparent. What's wrong there? CALayer *layer = self.layer; CAKeyframeAnimation *blinkAnim = [CAKeyframeAnimation animationWithKeyPath:@"opacity"]; blinkAnim.duration = 1.0; //blinkAnim.repeatCount = 0; blinkAnim.autoreverses = NO; // keyframe times and values // we want to start fully opaque,