AngleGradientLayer is a CALayer implementation of angle gradient.
(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
