Search code examples
iphoneiphone-sdk-3.0ipad

IPHONE - fade in and fade out of a UIImageView with different times


I would like to do a fade in and out of a UIImageView using different times, let's say, using the following parameters:

  • t = 0 ... UIImageView's alpha = 0
  • t = 0.5s ... UIImageView's alpha = 0.7
  • t = 0.7s ... UIImageView's alpha = 0

Is this possible to do with CAAnimation or other method? How can that be done?

thanks for any help!


Solution

  • You should probably look into CAKeyframeAnimation. It'll let you set values for multiple time points.