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 navigation controller's view:
[self.view addSubview:segmentTab1.view];
and
[self.view addSubview:segmentTab2.view];
Then, in the subViews, each has a UITableView, but my issue is, that I am unable to push a new viewController into view in the didSelectRowAtIndexPath
method.
The method is called correctly and by setting breakpoints, I can see the method for pushing the view gets called as well, but nothing happens. This is my code for pushing it:
[self.navigationController pushViewController:detailsViewController animated:YES];
I also tried
[super.navigationController pushViewController:detailsViewController animated:YES];
What am I doing wrong - or is is just not possible to do it with a subview?