1

Example:

1) fade an uiview from alpha 0.0 to 0.2 2) fade back to 0.15 3) fade to 0.25 4) fade to 0.2 5) fade to 0.35 6) fade to 0.3 7) fade to 0.45 8) fade to 0.4 ... and so on. each with a duration of 0.05 sec. The effect is a flashy appearing view. Just for fun.

Previously I did this with simple UIView animation blocks, where every new stage (2...8) was a method that has this huge methodName:finished:context: signature. I just used the delegate and didEnd selector stuff to proceed from one step to the next as the steps finish. This results in hardly-badly very ugly and chunky code. The stuff above would fill several screens.

So now I found this hopefully useful CAKeyFrameAnimation stuff. Could I just put lots of target states with durations etc. in a big array and feed the guy with input? Are there any good examples on how to do that?

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
Thanks
  • 40,109
  • 71
  • 208
  • 322
  • 1
    I answered this question before realising that you're the same person who asked the question I'm linking to. Why are you asking this question again? The answer I gave regarding the use of CABasicAnimation and CAKeyFrameAnimation are as good as you're going to find -- if you can't work with those examples to produce slight derivations, you're not going to have much luck writing iPhone applications in general. – Nathan de Vries Jul 22 '09 at 05:38

1 Answers1

0

I've written up a fairly complete illustration of how to use CAKeyFrameAnimation on another SO question.

Community
  • 1
  • 1
Nathan de Vries
  • 15,481
  • 4
  • 49
  • 55