michael
michael

Reputation: 2342

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?

Upvotes: 2

Views: 1105

Answers (2)

isaac
isaac

Reputation: 4897

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)

Upvotes: 2

user244343
user244343

Reputation:

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.

Upvotes: 2

Related Questions