0
votes

I've been wrestling with this for a while. I need to show additional information about the current view (which is a detail view itself).

Here's some images to show what I mean (it's not my app, but will similar design).

alt textalt text

The first view is top level navigation view. When the user drills down, they eventually end up with the second view (detail view). On the tab bar there're additional info about the detail (Benelli gun).

The problem is that I do not know a clean way to implement another tabbar controller/tabbar inside the original top level tabbar. Pushing a tabbarcontroller inside tabbar controller is messy and I haven't been able to get it to work cleanly.

So while a second "detail tabbar" would be nice, I'm exploring other ways.

I tried putting in a custom table with detail views but it doesn't look natural under the description (stats).

Looking for design suggestions, thanks.

4
Well nested tab bar controller are not supported by the SDK, so even if you manage to hack something together it is likely to break in a future OS version, and unlikely to work on all current versions anyway. The documentation states that a tab bar controller must be the outer-most view in the hierarchy. I would therefore suggest you find another way to present the information. You might want to go for a segmented control at the top for example.Mike Weller
That's what I learned the hard way after spending two days trying to get it working. I will try segmented control to see how it works out. Thanks.James

4 Answers

0
votes

I would use a segmented controller to display your options for the detail view. You can put it at the bottom of your view in place of the UITabBar if you use the hidesBottomBarWhenPushed property of the detail view controller to hide the tab bar.

0
votes

Why not just replace the buttons programmatically when you go to a proper section?

You can completely manipulate the tab bar buttons at run time can't you? That's probably what they do.

0
votes

This could just be a custom UIView at the bottom of the detail view, right? The custom view has a custom background, and 4 button, No? Pretty good idea if you ask me.

0
votes

Implement this as follows,

1) Create two diff tabBarControllers(each with 4 UIViewControllers).

2) When you want to change the tabBarController change the viewController.

(Note: don't use [self presentModalViewController:vc animated:NO] because here self won't point to the tabBarControllers instance, so use the tabBarControllers instance)