objective-canimationuikiteasing

What is the actual equation for Apple's UIViewAnimationCurveEaseInOut?


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?


Solution

  • 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.