标签:
- (void)drawRect:(NSRect)dirtyRect {
[super drawRect:dirtyRect];
NSGradient *backgroundGradient = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithDeviceRed:239.0/255.0 green:239.0/255.0 blue:239.0/255.0 alpha:1.0] endingColor:[NSColor colorWithDeviceRed:239.0/255.0 green:239.0/255.0 blue:239.0/255.0 alpha:1.0]];
[backgroundGradient drawInRect:[self bounds] angle:90.0];
// Drawing code here.
}
标签:
原文地址:http://www.cnblogs.com/PJXWang/p/5816931.html