ReactiveCocoaLayout — pull request #58 by joshaber (2013-04-18 20:19:46+00:00)
Title: Interpolation

_Depends on #56_

**Not quite ready to merge**

This adds the ability to customize the time interpolation for an animation. It is, imho, pretty awesome because it means animations more powerful than CA natively supports because it allows for values which exceed the start or end point. Like bounces or springs.

I'm curious for input on the API. The awkward bit is that it needs both the start and end value for the interpolation.

In the current API, the start value is given explicitly so that it would be used like:

```objc
CGRect startingFrame = self.button.frame;
CGRect endingFrame = CGRectOffset(startingFrame, -100, 0);

RACSignal *endInterpolated = [[RACSignal return:MEDBox(endingFrame)] animateWithDuration:1 start:MEDBox(startingFrame) interpolate:RCLBounceInterpolation()];
RAC(self.button.rcl_frame) = endInterpolated;
```

I considered eliminating the start parameter and instead not running the animation until the signal sends a second value. So use would be like:

```objc
CGRect startingFrame = self.button.frame;
CGRect endingFrame = CGRectOffset(startingFrame, -100, 0);

RACSignal *endInterpolated = [[RACSignal return:MEDBox(startingFrame) concat:[[RACSignal return:MEDBox(endingFrame)] animateWithDuration:1 interpolate:RCLBounceInterpolation()]];
RAC(self.button.rcl_frame) = endInterpolated;
```

The version with the explicit start feels more consistent with the other animation APIs to me, but I'm curious to see if anyone else has any opinions.