CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Gerardo Blanco.
GBGradientView
class provides an animated gradient view.
GBGradientView
works on iOS 7.1 SDK or later and is compatible with ARC projects.
You can directly add the header and implementation files to your project.
GBGradientView
wherever you need it with #import <GBGradientView/GBGradientView.h>
.This is an example of use:
First, import GBGradientView
lib. Your view controller must conform to the GBGradientViewDelegate
protocol.
#import <UIKit/UIKit.h>
#import <GBGradientView/GBGradientView.h>
@interface GBViewController : UIViewController <GBGradientVieDelegate>
@end
Then, initialize a GBGradientView
new instance.
GBGradientView gradientView = [[GBGradientView alloc] initWithFrame:self.view.bounds
orientation:GBGradientViewOrientationVertical];
gradientView.delegate = self;
gradientView.animationDuration = 3.0f;
gradientView.animationDelay = 3.0f;
[self.view addSubview:gradientView];
Finally, implement the GBGradientVieDelegate
protocols methods.
- (NSArray *)gradientColorsForGradientView:(GBGradientView *)gradientView
{
...
}
- (void)gradientViewAnimationDidStop:(GBGradientView *)gradientView
{
...
}