Recursive bug with PRTweenCGRectLerp::lerp method #18

Closed
rbrisita opened this Issue Feb 9, 2012 · 0 comments

Projects

None yet

2 participants

@rbrisita
rbrisita commented Feb 9, 2012

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
@domhofmann domhofmann pushed a commit that closed this issue Aug 13, 2012
Dominik Hofmann Fixes #18 bc6d57c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment