TabBarController with SWRevealViewController
Asked Answered
L

1

1

I have a "Sliding Side Menu" in my application working perfectly with SWRevealViewController.

  • 1 Sidebar VC with a tableView connected to 3 View Controllers with the menu button (at Navigation Bar)

I need to open a UITabBarController from a button inside one of them , and it must have the same sliding menu.

I created another SWRevealViewController and I linked the same way to my UITabBarController. I embed my first "tabVC" in a "Navigation View Controller" (see photo)

UitabBarController

When I did it, it works, but if I clicked in one of the cells at the "SideBar", it goes to the correct view (one VC working in my first Sidebar) But without Navigation Bar and with the bottom bar

How can I do it to have always Navigation Bar at top and only "TabBar" in my TabBarController?

SOLVED:

The order is SWRevealViewController to Navigation Controller, and then, UITabBarController. Also, the menu button is needed at UITabBarController instead of TabViews.

Landmass answered 12/5, 2014 at 17:3 Comment(2)
Unfortunately, you cannot reuse the same UINavigationController with the SWReavealViewController. I know, it is not DRY, but you will have to recreate the same UINavigationController for every new VC you push into the SWRevealViewController.Manual
I don't understand you at all... I have one ViewController that goes to a SWRevealViewController segues to a NavigationController and SideBarViewController. Then, I create another SWRevealViewController with segues to a different NavigationController and the same SideBarViewController.Landmass
C
3

Rearrange the order create the navigation controller first . then call the UITabbarcontroller

Carpenter answered 12/5, 2014 at 17:7 Comment(3)
I am displaying ViewController A and ViewController B on slide menu from tab bar. Using SWRevealViewController I have to display same ViewController A and ViewController B. It works fine, but it doesn't display both tab it only display ViewController tab in UITabbarController. My hierarchy is SWReveal -> UITabbarController - > UINavigationController - > UIViewController.Provencher
i have same issue @Anbu can you tell me how to Rearrange .Ausgleich
@jace can you provide a sample code for this implementation. Am also facing the same issue.Consequence

© 2022 - 2024 — McMap. All rights reserved.