I need to rotate NSProgressIndicator by 90 deg.
When I use the following code:
[self.progressIndicator1 setWantsLayer:NO];
[self.progressIndicator1 setFrameCenterRotation:90];
[self.progressIndicator1 setMinValue:0];
[self.progressIndicator1 setMaxValue:100];
[self.progressIndicator1 setDoubleValue:50];
[self.progressIndicator1 displayIfNeeded];
[self.progressIndicator2 setWantsLayer:NO];
[self.progressIndicator2 setFrameCenterRotation:90];
[self.progressIndicator2 displayIfNeeded];
This code works fine on OS X Yosemite, but not works on OS X El Capitan.
How I can fix it?
if your progress indicators are contained in a view then if you can allow the wantsLayer for that view your code will work.
self.view.wantsLayer = YES;
self.progressBar1.doubleValue = 60.0;
self.progressBar2.doubleValue = 60.0;
[self.progressBar1 setWantsLayer:NO];
[self.progressBar1 setFrameCenterRotation:90];
[self.progressBar2 setWantsLayer:NO];
[self.progressBar2 setFrameCenterRotation:90];
[self.progressBar2 displayIfNeeded];
this worked for me on El Capitan.