I want to be able to switch between a UITableView and a standard UIView in a Parent View. Basically I have a UITableView that shows on load displaying a log of information. I want to have a segment control in the header of the Window that when the user taps, transitions to a Graph View which is a standard UIView.
The UIViewController in question needs the ability to be pushed from a RootViewController stack.
I have tried a number of things, but I can’t seem to get this to work. Does anyone have any code examples or suggestions on how this could be done?
It’s actually not as difficult as it first seemed. Basically if you have a ParentViewController with a blank view and a NavController on top. Place the segment control in the center view of the NavController.
Then you just simply switch ViewController views when the segment control changes. The only thing you have to do is keep a pointer to the currentview and remove that before adding the new view to the parentVC. Code below: