2

I'm trying to make something time up with the equation seamlessly, and while I see something similar to what I need; I need it to be more accurate.

It would suffice to be able to call the actual easing equation UIKit uses.

So, what is the actual equation that UIKit animateWithDuration uses?

michael
  • 2,332
  • 2
  • 21
  • 27
  • Wonder if they originally lifted it from Actionscript - http://www.actionscript.org/resources/articles/170/1/Flash-MX-2004-Undocumented-TweenEasing-Classes-Documented/Page1.html ;) – gef Oct 25 '11 at 23:28
  • @gef Inbetweening animation (aka tweening) appeared in the early 20th century. – Jano Dec 13 '13 at 15:31

2 Answers2

2

You might have a look at Jeff Lamarche's enlightening article on Animation Curves. He's released his transition animation library into the public domain. He's also detailed the approach he took and documented it, should you be looking for inspiration or a starting point for your own project.

Apple's animations curves are not documented.

Link to article (Web Archive)

MichaelK
  • 185
  • 1
  • 10
isaac
  • 4,867
  • 1
  • 21
  • 31
  • As per my answer, `CAMediaTimingFunction` provides at least a *black box* equation for the animation. –  Oct 25 '11 at 23:24
  • Indeed it does! Lamarche's clear box just illustrates nicely the principles with pretty graphs-n-things. – isaac Oct 26 '11 at 19:08
2

Read the documentation for CAMediaTimingFunction, in particular the "Predefined Timing Functions" constants. You can enter the function constant kCAMediaTimingFunctionEaseInEaseOut as the parameter to [CAMediaTimingFunction functionWithName:], and then try getting values at various points from it to figure out what it does yourself.