Making a thinner UITabBar

I would like to be able to thin the UITabBar's height by removing each item's titles and reclaiming the vertical space they take up, a la Tweetie 2. This doesn't seem settable in the .xib or programmatically. Will I have to subclass the UITabBar and roll my own?

14.10.2009 00:32:53
Peter Boctor posted a good solution to this issue (and included a few more tab bar UI niceties) here.
sumizome 24.11.2012 07:30:35
2 ОТВЕТА
РЕШЕНИЕ

Roll your own. I'm sure Tweetie 2's is custom; and the height is set in the handed down UITabBar.

4
14.10.2009 00:36:39
I'm a bit lost as to where to begin subclassing this... the UITabBar's height property, and most likely its setItem:animated: method as well. Any other tips/resources for subclassing UIView objects like this?
alexbw 14.10.2009 01:22:52
Kendall is right in my use of roll, sorry for the confusion and let down. I agree though, it would sure be nice to have a customizable tab bar controller.
JoePasq 14.10.2009 01:53:34
Double drats. I guess I'm in for the long haul.
alexbw 14.10.2009 09:38:23
I suggest carefully studying the view controller's behavior in relation to other views and then piggybacking off of that, but modifying it where needed. For example, Tweetie 2 uses it's own icons, so it doesn't need to copy the special glare effect on the tab bar items (read the docs if you don't know what I mean); and your app may not need more than five tabs, so you can eliminate that functionality. But you may need to do some more work to support landscape mode. (If that helps at all.)
JoePasq 14.10.2009 13:39:30
Can anyone point to any good resources on how to do this? How can I create my own UITabBar?
barfoon 26.10.2010 01:22:14

You can achieve a similar effect by placing a segmented control inside a uitoolbar. I did this and it looks quite nice.

1
17.02.2010 15:58:35