cappuccino/cappuccino — pull request #2278 by cacaodev (2014-12-09 22:35:19+00:00)
Title: Animations: CPAnimationContext & animator

Here it is. Animations for cappuccino. Animations are implicit from the capp API point of vue, but explicit in the DOM. You define animations for a given key path on an target, then ask the -animator of this target to change the keypath value and the animation is run implicitly. In the backstage, a css animation is created, inserted into the stylesheet, and run.

Historically, in cocoa and cocoaTouch, several APIs have been added for animations. The CPAnimationContext & animator is the one currently used in cocoa, including the most recent versions. I think this approach is great for built-in animations in the framework. For example, it's easy to decide that when a CPViewController loads its view, the subviews will automatically fade-in when presented.
But from a user perspective, the API may seem a bit complex with the need to set default properties on CPAnimationContext and use the -animator instead of calling directly the view you want to animate. That's why we may consider to add the UIKit API where you can just do this on CPView:
```
+ (void)animateWithDuration:(NSTimeInterval)duration
animations:(void (^)(void))animations
completion:(void (^)(BOOL finished))completion
```

In this commit there are no built-in animations in the framework. What are the animations would you like to see when you interact with controls in cappuccino ?

There is a test there:Tests/Manual/CPAnimatablePropertyContainerTest/