-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background Color Animation #1683
Comments
I have the same issue with JazzHands 2.0, although the demo app works fine.
|
The issue is in - (id<IFTTTInterpolatable>)valueAtTime:(CGFloat)time
{
NSAssert(!self.isEmpty, @"At least one KeyFrame must be set before animation begins.");
id value;
NSUInteger indexAfter = [self indexOfKeyframeAfterTime:time];
if (indexAfter == 0) {
value = ((IFTTTKeyframe *)self.keyframes[0]).value;
} else if (indexAfter < self.keyframes.count) {
IFTTTKeyframe *keyframeBefore = (IFTTTKeyframe *)self.keyframes[indexAfter - 1];
IFTTTKeyframe *keyframeAfter = (IFTTTKeyframe *)self.keyframes[indexAfter];
CGFloat progress = [self progressFromTime:keyframeBefore.time toTime:keyframeAfter.time atTime:time withEasingFunction:keyframeBefore.easingFunction];
if ([keyframeBefore.value respondsToSelector:@selector(interpolateTo:withProgress:)]
// && [keyframeAfter.value isKindOfClass:[keyframeBefore.value class]]
) {
value = [keyframeBefore.value interpolateTo:keyframeAfter.value withProgress:progress];
} else {
value = keyframeBefore.value;
}
} else {
value = ((IFTTTKeyframe *)self.keyframes.lastObject).value;
}
return value;
} This is because |
@RodolfoAntonici Thanks for pointing out the issue, and @gazsp thanks for the super helpful detective work on the cause! |
Hey there,
Im having an issue with the IFTTTColorAnimation
The problem is: when it pass the 64 time, it just changes the color to red, isn't an animated transition.
I tried to change the colors alpha chanel as the example uses, it doesn't work either.
Aditional info:
iOS 8.4,
Xcode 6.4
Swift 1.2
The text was updated successfully, but these errors were encountered: