0

I am using the SWRevealViewController library for a side menu within my main view. Side menu consists of tableView. I have followed This tutorial

enter image description here

DashBoard Controller in frontView and tableView is rear a view. Route Assistant is view which segue with SWRevealViewControllerSeguePushController class. ViewAllTripsViewController opens on "Install Now" button. In ViewAllTripsViewController there is button (Float button ) which connect to ROuteAssistant VC via Push segue. when ROuteAssistant open with push segue , hamburger menu doesn't work (not showing any Side menu).

How can I show this?

I have tried this

if self.revealViewController() != nil {
            menuButton.target = self.revealViewController()
            menuButton.action = #selector(SWRevealViewController.revealToggle(_:))
            self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
        }

        else
       {
            print("Some Problem")
        }

when I select RouteAssistant From tableView(menu) is work properly but when is get access by button it goes to else condition

Komal Kamble
  • 424
  • 1
  • 8
  • 25

1 Answers1

0

I couldn't see any NavigationController in your storyboard. Add a Navigation Controller then set to initialController and connect to your rootViewController (set as RootViewController)

For push Programmatically check My answer : Push To ViewController

Don't Forget these things:

1. Your storyboard identifier is correct.
2. The root view have navigation Controller.

Edit :

Your storyboard initialViewController should be like this,
Note: I think you are choose ' Custom' option. Select the right one, ' Show' option.

enter image description here

Vineesh TP
  • 7,755
  • 12
  • 66
  • 130
  • which view should be embedded into navigationViewController : reavelViewController or DashboardView Controller(frontView) – Komal Kamble Jun 04 '16 at 11:40
  • Before "reavelViewController" add a Navigation controller, dafault it embedded a TableviewController , just delete the same. Control drag and connect to ' reavelViewController' set as RootViewController. Then set Navigation controller to initialViewController (drag the arrow on to NavigationController) – Vineesh TP Jun 04 '16 at 11:46
  • follow ur steps, still not working. Problem is when RouteAssistance View is show, hamburger menu doest show any SideBarMenu(tableView) – Komal Kamble Jun 04 '16 at 12:11
  • At first check with one or 2 viewcontroller then check it will work ? If you push from storyboard no need to do the same in programatically – Vineesh TP Jun 04 '16 at 12:13