NSProgressIndicator's setControlTint has no effect
I have a very simple task: change the NSProgressIndicator's color into graphite when the progress is paused by user, that is a determinate progress bar. I foun开发者_StackOverflow中文版d the method setControlTint but after using it there is just no effect. I also searched a lot there is not much clear answers. Is subclass NSProgressIndicator and do some custom drawing a must? I just wonder why this method there and no further document or discussion about proper usage.
Thanks a lot for any help :)
See doc:
Doc for NSProgressIndicator setControlTint:
Sets the receiver’s control tint.
- (void)setControlTint:(NSControlTint)controlTint
Parameters controlTint
a constant indicating the desired control tint. Valid values for controlTint are described in NSCell.
Go to NSCell doc:
setControlTint:
Sets the receiver’s control tint.
- (void)setControlTint:(NSControlTint)controlTint
Parameters controlTint - an Designated Initializers value that specifies the tint of the receiver.
Designated Initializers
When subclassing NSCell
you must implement all of the designated initializers. Those methods are: init
, initWithCoder:
, initTextCell:
, and initImageCell:
.
In to words you must subclassing NSProgressIndicator and implement all of the designated initializers. (see above).
精彩评论