I have a UINavigationViewController
and inside that I have added a UITableViewController
as a subview.
I'd like to be able to tell the UINavigationViewController
pushViewController from inside the UITableViewController
, but I am unable to retrieve the correct navigationController object.
I have tried some of the methods discussed in this thread, but I cannot get the navigationController for the view.
Is there a way to get a reference for the 'owning' view for a subview?
EDIT: I was able to do this:
[[(MyAppDelegate *)[[UIApplication sharedApplication] delegate] mainViewController].navigationController pushViewController:oOptionsViewController animated:YES];
To make it work. But the issue is just I'd like to do it without necessarily knowing the specific name of the navigationController (say it I have several of these instances, where I use the same class, but they may be used in other navigation controllers..)