0

Is there anyway that I can have tabs on an iPhone hide if there is not enough room to display them. The best example I can think of is on Android Music Player the tabs for "Artist", "Albums", "Songs" are displayed but "Recent", "Playlists", "Genres" are hidden to the left or right of these tabs.

Picture of tabs on Android

Stefan Bossbaly
  • 6,682
  • 9
  • 53
  • 82

2 Answers2

1

There's no easy way to do that, no. In fact, I doubt the Apple HIG would even allow it.

Should you, however, decide to proceed anyway, you'll want to set the hidden property of the UITabBar to YES. This will only hide it - you may also have to resize the views.

This entire process definitely isn't trivial nor should it be, since it's something that simply shouldn't be done - users may appreciate the extra space but will immediately get lost.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

You can set the tabbar to be hidden, by setting up an IBOutlet. Better yet, code it in such a way that when the user taps the screen, the tabbar appears, similar to a toolbar appearing when user taps the screen. It is very simple to do, and frees up screen space!

Prajoth
  • 900
  • 3
  • 12
  • 26