I'm adding an NSProgressIndicator to my NSMenuItem (with a custom view). It works fine, but it has a weird square around it:
Here is my code:
// In my @interface declaration:
NSProgressIndicator *_spinner;
...
// In initWithFrame:
_spinner = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, 20, 20)];
[_spinner setBezeled:NO];
[_spinner setTranslatesAutoresizingMaskIntoConstraints:NO];
[_spinner setControlSize:NSMiniControlSize];
[_spinner setStyle:NSProgressIndicatorSpinningStyle];
[_spinner sizeToFit];
[self addSubview:_spinner];
I am not sure why this is happening. Does anyone have any idea?
Thanks.