I’m trying to reload a viewcontroller that has already been created and retained but is not currently displayed. I can’t use poptorootviewcontrolleranimated as the view controllers aren’t being stored in a navigation stack. The reason for this is that the user should be able to move between views without having to navigate back through all previous views. In other words I’m trying to implement the functionality of a tabbar application. Where it becomes tricky is that I’m using a Facebook style split view with a tableview on the left.
So far I have
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
appDelegate = [[UIApplication sharedApplication] delegate];
switch (indexPath.section) {
case 0:
if (appDelegate.firstViewController.isViewLoaded) {
I’m not sure what the next line of code should be the view that should be loaded is
appDelegate.firstViewController
as this has already been created and was set as the rootViewController in
applicationDidFinishLaunching
Hope this makes sense and any help would be appreciated!
If you are using a UISplitViewController, you would want to set its viewControllers property at index 1 to be your view controller you want to display.