How can I display the spinning NSProgressIndicator in a different color?

I actually have implemented clones of the spinning NSProgressIndicator that might suit your needs. They can be drawn at any size and in any color. One is a subclass of NSView, which can be used on OS X 10.4, and the other is a subclass of CALayer, which can be used in a CoreAnimation-based project. The code is on github (both the NSView-based version and the CoreAnimation-based version), and there is a post with some screenshots on my blog.


This is what I've done:

    #import <QuartzCore/QuartzCore.h>

    ...

    CIFilter *lighten = [CIFilter filterWithName:@"CIColorControls"];
    [lighten setDefaults];
    [lighten setValue:@1 forKey:@"inputBrightness"];
    [self.indicator setContentFilters:[NSArray arrayWithObjects:lighten, nil]];

Tags:

Cocoa