tags:

views:

430

answers:

1

I have this button on the leftside of my UISplitViewController (RootViewController) that has a "Add New" button. I want the user to be able to click the button a new view come pop up so the user can add a new RSS feed to their subscription. So far I have the button and the "Add New" button correctly calling a method in the controller, but there's no way for me to add superviews or subviews. What's the best way to go about doing this?

+2  A: 

I think you might be looking for UISplitViewController.viewControllers. Something like this will allow you to access the subviews for the left and right panels of the split view controller. Assuming splitViewController is your split view controller:

UIViewController* leftController = [splitViewController.viewControllers objectAtIndex:0];
UIViewController* rightController = [splitViewController.viewControllers objectAtIndex:1];
UIView* leftView = leftController.view;
UIView* rightView = rightController.view;

Afterwards, you can add subviews in the normal way to leftView and rightView.

speckledcarp