Reputation: 1452
I'm about to start work on my first big iOS app, but haven't really started any code yet... So it's all theoretical, and in my head at the moment as I'm still in the design phase.
Regardless, I know I'm going to need some animation effects in the app, so I'm just doing some research. In Flash (AS3), there are libraries like Tweener, and TweenLite that have TONS of easing options available.
Am I crazy, or are there really no other easing options available besides the four standard ones:
Am I really going to have to dig into deep core animation to accomplish this? Or does anyone know of some 3rd party SDK that'll come in handy.
Thanks all...
Upvotes: 1
Views: 1939
Reputation: 131481
As the other poster suggested, keyframe animations let you describe motion along complex curves, or between designated key points.
If you want a custom timing function, you can create one pretty simply, and use it anywhere that you can specify one of the canned timing functions like linear or ease in, ease out. Take a look at the CAMediaTiming Function class reference. Specifically, look at the method functionWithControlPoints::::
That lets you create a timing curve using a single cubic bezier curve. That's your only option, I'm afraid.
What effect are you after, specifically?
Upvotes: 1
Reputation: 43330
Actually, there is one other: UIViewAnimationCurveLinear... Wow, that's a downer. The reason you're seeing such limited options, is because you've only explored UIView's Core Animation wrapper. Core Animation is much more powerful, and capable than that. If you need absolute fine-grain control over your animation, use CAKeyFrameAnimations, and if you need soft-grain control, use CAAnimation and CABasicAnimation. Even CATransaction will work. Basic easing curves were built into iOS because you are expected to provide the instructions for interactions more complicated than that. See here for an excellent series of easing curves that work great with CAKeyframeAnimation. Of course, this isn't for everyone... So there's a beta framework available with built-in tweeting values here
Upvotes: 3