iosobjective-ciphoneuitabbarcontrollerswrevealviewcontroller

SWRevealViewController and Tab Bar Controller in detail


This question has been asked before and has been answered, my question is not unique but there must be something missing as none of the structures I have tried works. I am simply trying to achieve the SWRevealViewController "menu" button in each of the scenes of a Tab Bar Controller.

This is the current setup:

enter image description here

Textwise: SWRevealViewController -> reveal view controller set controller (sw_front) -> Navigation Controller -> root view controller (segue) -> Tab Bar controller -> Navigation controller -> Scene

SWRevealViewController *revealViewController = self.revealViewController;
if ( revealViewController )
{
    [self.sidebarButton setTarget: self.revealViewController];
    [self.sidebarButton setAction: @selector( revealToggle: )];
    [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
}

This code is in the viewDidLoad method of each scene, the SWRevealViewController.h is imported and the menu button is declared.

When the menu button is pressed nothing happens.

I have been on this issue for days and I am sure it must be something simple, help really would be appreciated.


Solution

  • i think you forget sw_rear for side menu segue . those 2 screenshots can help you

    sw_front and SWRevealViewControllerSegueSetController for tabbar segue front

    sw_rear and SWRevealViewControllerSegueSetController for sidebar viewcontroller segue

    rear

    and finally this is an example of tabbar with SWRevealViewController that i did look this screenshot .

    enter image description here