I am using SWRevealViewController to implement a slide menu (from the left side) in my application. Everything is working fine but now I am facing a little problem.I want to pass data from my "main" view controller (the one that is full visible, and I am not calling it "frontViewController" because it seems like it is not the front one). I have tried all possiblities I can think of to access the slide menu controller and pass data to it. Here is what i have tried:
(MyControllerClass*)self.revealViewController.rearViewController
(MyControllerClass*)self.revealViewController.frontViewController
Than I tried things like self.revealViewController.navigationController[0]
, self.revealViewController.navigationController[1]
, also this , self.revealViewController.viewControllers[0]
,self.revealViewController.viewControllers[1]
. The next step was to implement prepareforsegue
and listen for segue identifier sw_front
and sw_rear
. But in non of these cases, I got true when checking isKindOfClass[MyControllerclass class]
. I assume this is because all of these are of type SWRevealViewController, aren't they ? And, prepareForSegue isnt't being called at all, but everything is showing properly
The main question for me is, how can I pass data between my side menu and my "main" (aka front) controller (the other way would also be fine)?
thanks