Skip to content

semireg/AngleGradientLayer

 
 

Repository files navigation

AngleGradientLayer

AngleGradientLayer is a CALayer implementation of angle gradient.

screenshot

Sample usage with AngleGradientView

(See demo project for more.)

#import "AngleGradientView.h"

@interface MyView : AngleGradientView
@end

@implementation MyView

- (id)initWithFrame:(CGRect)frame
{
	if (!(self = [super initWithFrame:frame]))
		return nil;

	self.colors = [NSArray arrayWithObjects:
		(id)[UIColor colorWithRed:0 green:0 blue:0.5 alpha:1].CGColor,
		(id)[UIColor colorWithRed:1 green:1 blue:0.4 alpha:1].CGColor,
		nil];

	return self;
}

@end

About

Objective-C angle gradients for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 98.0%
  • Ruby 2.0%