Some brief background:
I am using ViewDeck, which allows the app to switch between views using a slider menu similar to the one used in Facebook or Foursquare apps. In my app there is a primary view which users spend the most time on called MainProfileView
, as well as several secondary views. With ViewDeck
, the view that gets displayed in the center is set such that [self.viewDeckController setCenterController:NAME_OF_VIEW_CONTROLLER]
The problem:
My issue is, when I initially set my centerController
as MainProfileView
, or to one of these secondary views, everything works fine. However, when I attempt to set centerController
as MainProfileView
again after previously setting it to something else, all the views that were previously programmatically added to MainProfileView
would not show, and only the ones that I added using the Storyboard shows up. I'm unsure why this issue is occurring, and would ideally like whichever view that were previously shown in MainProfileView
to still be there when I later set my centerController
as it again.
Thanks!
As some background, here is how my AppDelegate is configured:
UIStoryboard* mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
UIViewController* menuController = [mainStoryboard instantiateViewControllerWithIdentifier:@"menuViewController"];
//UIViewController *rightController = [mainStoryboard instantiateViewControllerWithIdentifier:@"rightViewController"];
UINavigationController* centerViewController = (UINavigationController *) self.window.rootViewController;
self.viewDeckController = [[IIViewDeckController alloc] initWithCenterViewController:centerViewController leftViewController:menuController rightViewController:nil];
self.window.rootViewController = self.viewDeckController;
[[UIView appearance] setTintColor:[UIColor whiteColor]];