4

My buttons seem stretched, especially in landscape orientation. I can't find a property to adjust either on the UITabBar, UITabBarViewController, or on the UITabBarItem's themselves. (Of course, one answer would be to get an iPad...but that doesn't solve the need for a phone.)

For example, consider this simple Tab Bar Example - if I only could set the tab bar to auto-shrink as more buttons are added, or manually adjust the width to fit them all on the tab bar, I would be happy.

Jay Imerman
  • 4,475
  • 6
  • 40
  • 55
  • Can you explain what this is about? I'm not sure what these things are because you haven't provided me with a context to work with and the tags don't give any information about the subject =/ – Freesnöw Apr 27 '11 at 16:58
  • Give us a screenshot, please. – Nick Weaver Apr 27 '11 at 17:28
  • Consider a UITabBar where I initialize views and tab bar items programmatically in the Tab Bar Controller's init function http://screencast.com/t/tJ9g8kxjmrnz When it gets past 5 items, I automatically get More..., but in my app's case I only have 7 items, and they would fit if I could slim down the tab bar item widths. I can't figure out a property or method on the tab bar controller, tab bar, or item to do this. – Jay Imerman May 03 '11 at 16:15
  • If I add tab bar items graphically in Interface Builder, it adjusts the widths so I don't get a More button. That's what I want to do programmatically. – Jay Imerman May 03 '11 at 16:17

1 Answers1

2

It is not possible to use the UITabbar with more than five visible buttons. You've got to write your own component.

Here at significantpixels.com / The iPhone Tab Bar Lessons From Reality is an article about the tab bar which explains in detail how to design your tab bar from a UX point of view. And the magic number of tabs is five ;)

Nick Weaver
  • 47,228
  • 12
  • 98
  • 108