I’m using the really-rather-lovely ECSlidingViewController to create a sidebar for the main view in my application. All’s working fine, smooth, sexy. I’d like to pass data between the two views, but I’m somewhat at a loss for how to do so considering I instantiated the second view controller using this line of code:
self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier: @"Sidebar"];
If I’d done it with a segue or similar, this’d be fine, but how do I refer to the instance of my SidebarViewController (with identifier Sidebar) if I created it in this way? I need to get at the properties of that view, so for instance, something like self.sidebar.name, etc.
Seems like something that’d be very simple to do, but I’m missing something, clearly.
Thanks in advance, overflowers!
EDIT: I’d point out that I can’t refer to [self.slidingViewController.underRightViewController setXYZProperty];.
Figured it out:
I knew it’d be easy..