Skip to content
Permalink
Browse files

Update ZCEasingUtil.m

Rename some methods for duplicate symbols error with others libs.
  • Loading branch information...
skrew committed Nov 13, 2015
1 parent 28f6641 commit 579af6f6dd953eedc7a2809b4d1b38ad04666f82
Showing with 13 additions and 13 deletions.
  1. +13 −13 ZCAnimatedLabel/ZCAnimatedLabel/ZCEasingUtil.m
@@ -11,18 +11,18 @@

#import "ZCEasingUtil.h"

CGFloat QuadraticEaseIn(CGFloat p)
CGFloat ZCQuadraticEaseIn(CGFloat p)
{
return p * p;
}

CGFloat QuadraticEaseOut(CGFloat p)
CGFloat ZCQuadraticEaseOut(CGFloat p)
{
return -(p * (p - 2));
}


CGFloat BounceEaseOut(CGFloat p)
CGFloat ZCBounceEaseOut(CGFloat p)
{
if(p < 1/2.75)
{
@@ -45,18 +45,18 @@ CGFloat BounceEaseOut(CGFloat p)
}
}

CGFloat BounceEaseIn(CGFloat p)
CGFloat ZCBounceEaseIn(CGFloat p)
{
return 1 - BounceEaseOut(1 - p);
return 1 - ZCBounceEaseOut(1 - p);
}

CGFloat BackEaseIn(CGFloat p)
CGFloat ZCBackEaseIn(CGFloat p)
{
CGFloat s = 1.70158;
return (p * p * ((s + 1.0) * p - s));
}

CGFloat BackEaseOut(CGFloat p)
CGFloat ZCBackEaseOut(CGFloat p)
{
CGFloat s = 1.70158;
CGFloat p2 = p - 1.0;
@@ -117,32 +117,32 @@ + (CGFloat) bounceWithStiffness: (CGFloat) stiffness numberOfBounces: (CGFloat)

+ (CGFloat) easeInWithStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time:(CGFloat) progress
{
return startValue + (endValue - startValue) * QuadraticEaseIn(progress);
return startValue + (endValue - startValue) * ZCQuadraticEaseIn(progress);
}

+ (CGFloat) easeOutWithStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time:(CGFloat) progress
{
return startValue + (endValue - startValue) * QuadraticEaseOut(progress);
return startValue + (endValue - startValue) * ZCQuadraticEaseOut(progress);
}

+ (CGFloat) easeOutBounceStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time: (CGFloat) progress
{
return startValue + (endValue - startValue) * BounceEaseOut(progress);
return startValue + (endValue - startValue) * ZCBounceEaseOut(progress);
}

+ (CGFloat) easeInBounceStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time: (CGFloat) progress
{
return startValue + (endValue - startValue) * BounceEaseIn(progress);
return startValue + (endValue - startValue) * ZCBounceEaseIn(progress);
}

+ (CGFloat) easeOutBackStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time: (CGFloat) progress
{
return startValue + (endValue - startValue) * BackEaseOut(progress);
return startValue + (endValue - startValue) * ZCBackEaseOut(progress);
}

+ (CGFloat) easeInBackStartValue: (CGFloat) startValue endValue: (CGFloat) endValue time: (CGFloat) progress
{
return startValue + (endValue - startValue) * BackEaseIn(progress);
return startValue + (endValue - startValue) * ZCBackEaseIn(progress);
}

@end

0 comments on commit 579af6f

Please sign in to comment.
You can’t perform that action at this time.