Specify height of UIToolbar in Storyboard
Asked Answered
R

1

5

enter image description here

When I try to change the height of a UIToolbar through Storyboard, the option is greyed out.

I'm aware I can do this programatically, but is there any alternative way to do it on my storyboard, perhaps by using a different interface item? It'd be better to have it all on storyboard, to avoid code confusion. Or should I not be changing the height - is that likely to get it rejected from the app store?

My end goal is a toolbar with 50 x 50 image icons on, and a bit of padding.

N.B. I've read this question - but here, the accepted answer doesn't seem to actually answer the question...

Rola answered 25/2, 2014 at 17:18 Comment(2)
I could change the height of a segment control by adding a height constraint ( using auto layout ). Can you check if this works for you?Gaylord
Yes, it did! Even more infuriating...if you can 'force' it in like that, why not allow it by default! Thanks a lot - if you want to post that as a full answer, I'll accept! @RainerSchwarzeRola
G
9

If you use auto layout, you could set a Height Constraint. This worked for me on a UISegmentedControl, but I did not test it on a UIToolbar.

Gaylord answered 26/2, 2014 at 10:42 Comment(2)
In case you like to take a look at my orginal problem: https://mcmap.net/q/2031936/-auto-layout-in-navigation-controller-with-uisegmentedcontrol-good-in-ios7-bad-in-ios6/1396265 . Apparently the segmented control causes some issues with auto layout when using a navigation controller :-) Unfortunately I couldn't fix my problem with an IB-only solution...Gaylord
Ugh - horrible! Fortunately this is app is for internal company use, so I can essentially specify iOS7 only. Cheers!Rola

© 2022 - 2024 — McMap. All rights reserved.