Domanda

I am new to cocoa development.

Is there a way to reduce the height of a NSProgressIndicator from interface builder? I see the height is grayed out on 19 pt there!

I see also a size property with small and regular but what about I creating my own size?

È stato utile?

Soluzione

I was not working with NSProgressIndicator but I worked a lot with UIProgressView (iOS analog of NSProgressIndicator). And it is impossible to change UIProgressView's height neither in IB neither by changing its frame property.

But there is a nice workaround! In iOS you can use transform property to change the height. Following will reduce height by 50%:

_progressView.transform = CGAffineTransformMakeScale(1.0f, 0.5f);

Maybe you can use the same workaround for NSProgressIndicator.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top