TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | CC |
ReleasedLast Release | Dec 2014 |
Maintained by Levi Brown.
A UIView subclass which draws a configurable gradient.
If you're using CocoPods it's as simple as adding this to your Podfile
:
pod 'GRKGradientView', '~> 1.0'
Use as you would any other UIView, and simply configure appropriate to your needs. In the simplest case, all you need supply are two colors for the start and end of the gradient.
@property (nonatomic,weak) IBOutlet GRKGradientView *downGradient;
@property (nonatomic,weak) IBOutlet GRKGradientView *upGradient;
- (void)viewDidLoad
{
[super viewDidLoad];
self.downGradient.gradientColors = [NSArray arrayWithObjects:[UIColor lightGrayColor], [UIColor darkGrayColor], nil];
self.upGradient.gradientOrientation = GRKGradientOrientationUp;
self.upGradient.gradientColors = [NSArray arrayWithObjects:[UIColor whiteColor], [UIColor blackColor], nil];
}
Additional documentation is available in GRKGradientView.h
.
A professional iOS engineer by day, my name is Levi Brown. Authoring a technical blog grokin.gs, I am reachable via:
Twitter @levigroker
App.net @levigroker
Email [email protected]
Your constructive comments and feedback are always welcome.