views:

2206

answers:

2

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

Do Apple allow resizing of this control? and if so, how do I go about it?

A: 

AFAIK, You can't change its height.

You could create one of your own and set whatever size you want.

Update:

The only advantage that UIToolbar gives you is that you can drop bar button items and space bar button items on it for easier location.

These can be easily replaced by a simple UIView that will contain regular buttons (UIButton) if you need it to look different from the built-in toolbar.

Michael Kessler
if you create your own, would it go against HIG?
Joo Park
How would I go about this?
mac_55
@Joe Park, It depends on your exact UI implementation. Besides, I don't think that one can create a toolbar that might go against HIG. We talk about basic UI element - UIView with few buttons on it. You don't even have to call it toolbar.
Michael Kessler
@mac_55, What do you mean?
Michael Kessler
@Michael Kessler I was just wondering how I'd go about "creating one of your own and set whatever size you want". No worries, figured it out now :)
mac_55
+4  A: 

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.

David Kanarek