You should implement the following method in your category list controller
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
For instance, my LeftMenu was basically a UITableviewController (Same as in the ECSlidingViewController basic demo), I needed to filter the items shown in TopViewController based on what row was tapped in the LeftMenu, here is how I did it:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//To stop TopViewController from being reset each time.
ECSlidingSegue *slidingSegue = (ECSlidingSegue *)segue;
slidingSegue.skipSettingTopViewController = YES;
//getting the dataobject associated with the selected table row
NSIndexPath *selectedIndexPath = [_tableView indexPathForSelectedRow];
MyDataObject *dataObject = [_dataArray objectAtIndex:selectedIndexPath.row];
//Digging down into the hiearchy to get to my required view
UITabBarController *tabBarController = (UITabBarController *)[[segue destinationViewController] topViewController];
UINavigationController *navigationController = [[tabBarController viewControllers] objectAtIndex:0];
MyFilteredListViewController *filteredListViewController = (MyFilteredListViewController *)[navigationController topViewController];
//Calling a method on the viewcontroller
[filteredListViewController filterForDataObject:dataObject];
}
So I had to dig down a little to find the viewcontroller that I specifically needed because MyFilteredListViewController was inside a Navigation Controller which was in turn a child of TabBarController which was then set as the TopViewController of the ECSlidingViewController.
It should be more straight forward to access viewcontrollers if they are not nested in a complex manner :)
Once you have the view controller that you require then you can call a method on it (as I did) or you could access a variable property and set its value.
You will have to import "ECSlidingSegue.h" into your category list controller.
Hope this helps!