CALayer opacity animation
问题 I want to create a CALayer animation that gives sort of a 'flashy' effect. For that I'm trying to animate the 'opacity' property, but my problem is that I have no idea where to start and how to do it. Here is a graphical explanation of the animation: opacity | ___ 1 | | | | | | * repeatCount 0 |___| |_ . . . -------------------------> time |______| duration The opacity starts at 0, then animates to 1, then to 0 again (this 0-to-1-to-0 animation takes a number of seconds equal to duration).