I'm using SWRevealViewController
. My frontViewController
displays the various different content of the app and the rearViewController
displays a table with links to those options. So if my frontViewController is currently display the Home page I want the rearViewController
menu table to highlight that row, and so on for each of the other options. To do this the menu or rearViewController
needs to know which view is being displayed by the frontViewController
. I have tried setting a restorationIdentifier
on each of the ViewControllers
displayed by the frontViewController
and then accessing them in the menuViewcontroller but each time they return nil
.
So I was doing something like this in the menuViewControllers viewDidLoad
method
self.revealViewController.frontViewController.restorationIdentifier
I also set the restorationIdentifiers on VC Views and tried this:
self.revealViewController.frontViewController.view.restorationIdentifier
but that also returned null