I have a UISplitViewController, and I'd like to change the root view controller (on the left side of the screen) when I click a button in the detail view (the right side of the screen).
If I do this in the detail view:
NextGameViewController *newTableViewController = [[NextGameViewController alloc] init];
NSArray *newVCs = [NSArray arrayWithObjects:newTableViewController, self, nil];
splitViewController.viewControllers = newVCs;
It crashes with the error:
-[NextGameViewController setParentViewController:]: unrecognized selector sent to instance 0x4938a50
NextGameViewController is a subclass of UITableViewController, so why is this happening? If I push it onto the view controller stack from the root view it works fine.