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

前端 未结 9 1714
温柔的废话
温柔的废话 2020-12-03 01:27

I am using a \"spinner\" NSProgressIndicator in my cocoa app:

I would like to display it in a different color so that it will show up well on a dark backgr

9条回答
  •  北海茫月
    2020-12-03 02:08

    This is what I've done:

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

提交回复
热议问题