Non-linear property interpolation for interactive transitions
In the implementation of an interactive transition, I'd like to mimic the animated transition that uses the non-linear easing functions. After searching around CA, it looks like interpolation machinery is all hidden behind private APIs.
- Is there a way to leverage Core Animation to do the grunt work for me?
- Do I need to roll my own value interpolation?
- Is there some existing open source lib that does this?
It turns out that instead of manually modifying all the properties myself, I can schedule the animation normally, then set the layer speed to 0 and control the progress using the layer's timeOffset property. Given the animation duration is 1 second, the percentComplete maps directly to the timeOffset.
I've learned this from the iOS Core Animation: Advanced Techniques by Nick Lockwood.