1

I am currently in need of 8 TabBarItems, and I can show just 4 items in view. And I need to be able to scroll to the next 4 tabBarItems.

In the default behavior of the UITabBar, you normally get a 'MORE' tabbaritem for more than 5 tab bar items. I want it to be the Scroll Button in place of the MORE button.

So ~ ~If I press the scroll button (or the fifth) tabBarItem, it should display 4 more tab bar items with a back scroll button.

These are my ways of doing this - -

  1. Implementing a Scroll UITabBarItems but this would mean I have to work on the project from scratch, and this is not my best option.

  2. I can push view controller on the final tab and show a new view with 4 tab bar icons, and work on that. (Having trouble with pushing a tab bar controller from a tab bar controller)

  3. I can make present a modal view controller for the next four tabs and pop it when I press back scroll button. (Having trouble with setting up a tabbarcontroller as a present modal view controller)

  4. Removing all views from the tabBarViewController array and adding new ones when the corresponding tab is clicked. And again reloading the same tabs when previous tab is clicked. What are the complications of these ? I do not wish to disturb the rootController.

Anything else you can think of ?

Whatever approach I take, I need sliding animation between the two views.

I would appreciate it if anyone could offer expert advice on what can be done.

Thanks.

Legolas
  • 12,145
  • 12
  • 79
  • 132
  • possible duplicate of [Sliding UITabBarItems in UITabBarController](http://stackoverflow.com/questions/6700184/sliding-uitabbaritems-in-uitabbarcontroller) – jscs Jul 22 '11 at 17:46

2 Answers2

1

I only see two good options:

  1. Throw tabs down the drain, accept what that eight options is too much for a tab bar. Instead go for a top level selection screen. Use a table view with a list, or a home screen like grid of options.
  2. Bite the bullet and implement your own LGInfiniteTabBarController, including a LGInfiniteTabBar, that actually have the behavior you want. There is no standard control for what you want.
PeyloW
  • 36,742
  • 12
  • 80
  • 99
  • Your approach is great for an app 2.0. Development time is crucial here. What are your thoughts on options 2 and 3 ? – Legolas Jul 22 '11 at 15:34
  • 2. Double tab bars, never! 3. If the grouping of items is logical, maybe. Remember; Pain is temporary, suck is forever. – PeyloW Jul 25 '11 at 06:25
0

You could receive the delegate – tabBarController:didSelectViewController: and if it's an edge view controller, perform an animation and switch out your tabbarcontrollers viewcontrollers. You would have an empty viewcontroller which has a tabbar items that says 'Next' or 'Prev' or whatever, and you manage the separate arrays's of view controllers with the empty viewcontroller in whichever tabs would show more. Then just swap in the proper viewcontrollers when the user uses that tab.

thelaws
  • 7,991
  • 6
  • 35
  • 54