Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

- Button's positioning on UIToolBar in IB -

As a fervent adept of IB, I created a UIToolBar (in IB of course) and added to it a few buttons.

So far so good ... but then I tried to move each of them to the right position but IB doesn't let me do it ... Each time I try to scroll them IB moves them back to the former position !

Is there a way to choose their position in IB ?

If not, could you give me a piece of code for me to choose their position programatically ? (sigh :D)

Thanks,

Gotye.

like image 618
gotye Avatar asked Mar 17 '10 12:03

gotye


1 Answers

If you want buttons to be anything other than left-aligned in a UIToolbar, you need to add flexible spacers alt text to your toolbar.

like image 193
Ben Gottlieb Avatar answered Sep 21 '22 14:09

Ben Gottlieb