Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 598 Bytes

README.textile

File metadata and controls

31 lines (20 loc) · 598 Bytes

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