I have a UINavigationController and I have seperate UIViews that I switch between using a UISegmentControl. On switching the views, I add the view as a subview to my navigat
Instead of
[self.view addSubview:segmentTab1.view];
and
[self.view addSubview:segmentTab2.view];
you may use
[self pushViewController: segmentTab1 animated: NO];
and
[self pushViewController: segmentTab2 animated: NO];
to add your viewControllers to the navigation hierarchy, and make [super.navigationController pushViewController:detailsViewController animated:YES];
work.