Is there a way to change the height of a UIToolbar?

mac_55 picture mac_55 · Jan 25, 2010 · Viewed 63.8k times · Source

I've got an UIToolbar in Interface Builder and I've noticed that it's locked to being 44px tall. Of course I'd like to make this larger.

Does Apple allow resizing of this control? If so, how do I go about it?

Answer

David Kanarek picture David Kanarek · Jan 26, 2010

Sure, just set its frame differently:

[myToolbar setFrame:CGRectMake(0, 50, 320, 35)];

This will make your toolbar 35 pixels tall. Of course this requires an IBOutlet or creating the UIToolbar programmatically, but that's very easy to do.