height of progress view xcode

Amelia777 picture Amelia777 · Jul 3, 2012 · Viewed 11.1k times · Source

Is there a way to change the height of a progress view bar in Xcode?

I am using Xcode 4.3 and need a vertical progress bar. I rotated the bar but now cannot change the height and is displays as a circle.

Also a more effective way to rotate the progress bar would be helpful.

Thanks!

Answer

CodaFi picture CodaFi · Jul 3, 2012

Some have reported that changing it's frame manually will work:

[self.progressView setFrame:CGRectMake(0, 0, 300, 25)];

Whereas others have reported that a CGAffineTransform() works as well:

[self.progressView setTransform:CGAffineTransformMakeScale(1.0, 3.0)];

As for rotation, use:

#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
[self.progressView setTransform:CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(angle))];