RBBCustomAnimation
RBBCustomAnimation *rainbow = [RBBCustomAnimation animationWithKeyPath:@"backgroundColor"];
rainbow.animationBlock = ^(CGFloat elapsed, CGFloat duration) {
UIColor *color = [UIColor colorWithHue:elapsed / duration
saturation:1
brightness:1
alpha:1];
return (id)color.CGColor;
};
The arguments of the block are the current position of the animation as well as its total duration.
Xcode- iOS Animation RBBCustomAnimation
Reviewed by Unknown
on
2:02 PM
Rating:

No comments: