dominikhofmann/PRTween — Issue #18: Recursive bug with PRTweenCGRectLerp::lerp method
Author: transmitiveRB
Created: 2012-02-09 19:56:50+00:00
State: open

Lines 181 - 185 in PRTween.m

This method calls itself and does not pass along the given timeingFunction too:

#if NS_BLOCKS_AVAILABLE
+ (PRTweenOperation *)lerp:(id)object property:(NSString *)property from:(CGRect)from to:(CGRect)to duration: (CGFloat)duration timingFunction:(PRTweenTimingFunction)timingFunction updateBlock: (PRTweenUpdateBlock)updateBlock completeBlock:(PRTweenCompleteBlock)completeBlock {
return [PRTweenCGRectLerp lerp:object property:property from:from to:to duration:duration timingFunction:NULL updateBlock:updateBlock completeBlock:completeBlock];
}
#endif

It should be:

```
#if NS_BLOCKS_AVAILABLE
+ (PRTweenOperation *)lerp:(id)object
property:(NSString *)property
from:(CGRect)from
to:(CGRect)to
duration:(CGFloat)duration
timingFunction:(PRTweenTimingFunction)timingFunction
updateBlock:(PRTweenUpdateBlock)updateBlock
completeBlock:(PRTweenCompleteBlock)completeBlock
{
PRTweenCGRectLerpPeriod *period = [PRTweenCGRectLerpPeriod periodWithStartCGRect:from endCGRect:to duration:duration];
return [PRTween lerp:object
property:property
period:period
timingFunction:timingFunction
updateBlock:updateBlock
completeBlock:completeBlock];
}
#endif
```