I use SWRevealViewController to implement the slide menu (left) in the application. Everything is working fine, but now I am facing a small problem. I want to transfer data from my "main" view controller (the one that is completely visible, and I do not call it "frontViewController" because it seems that it is not front). I tried every possible opportunity that I can come up with in order to access the slide menu controller and pass data to it. Here is what I tried:
(MyControllerClass*)self.revealViewController.rearViewController
(MyControllerClass*)self.revealViewController.frontViewController
What I've 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 prepareforsegueand listen to the identifier segue sw_frontand sw_rear. But not in these cases, I am right when I check isKindOfClass[MyControllerclass class]. I guess this is because they all are of type SWRevealViewController, right? And, prepareForSegue is not called at all, but everything is displayed correctly
The main question for me is: how can I transfer data between my side menu and my "main" (aka front-end) controller (otherwise it will also be good)?
thank
source
share