I am using MFSideMenu
in my app which have 4 UIScrollViews
with the same code I am using the same exact code in this tutorial in 4 different UIViewControllers
which added as subviews whenever they're chosen form the SideMenuViewController
and that is the code I am using to do that
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 1 //or any Index) {
UIViewController *centerController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"centerController"];
UIViewController *secondController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"secondController"];
[centerController.view addSubview:secondController.view];
UINavigationController *navigationController = self.menuContainerViewController.centerViewController;
NSArray *controllers = [NSArray arrayWithObject:centerController];
navigationController.viewControllers = controllers;
[self.menuContainerViewController setMenuState:MFSideMenuStateClosed];
} }
The problem here is that the the view controllers don't show any images they show the UIScrollView background, though and when I test them separated in another application they work