I have a navigation controller that loads a tableview, from here the user can select a row which loads a detail view that gets pushed onto the stack. This detail view controller has a segmented control in the bottom bar which loads in a series of views using [self.view insertSubview:firstDetailViewController.view atIndex:0]; etc...
That works fine - one of the subviews loaded also contains a table which loads another detail view. This caused problems because I couldn't access the navigation controller from within the sub view. To do so I had to use:
YourAppDelegate *del = (YourAppDelegate *)[UIApplication sharedApplication].delegate;
[del.navigationController pushViewController:nextViewController animated:YES];
Which I found here: Accessing a Top Navigation Controller from a Subview Navigation Controller.
But there's another instance where similar functionality is required. From the home view controller a lists view is loaded and presented modally. From here I push 2 detail views onto this new navigation stack using self.navigationController etc... which works fine. But when the subview tries to push the detail view it doesn't work. self.navigationController doesn't work, the appDelegate one pushes them onto the other nav controller and self.parentViewController.navigationController doesnt work.
Any ideas?