So I have a ViewController class called "TopNewsViewController". It gets pushed onto the NavigationController stack from RootViewController.
In TopNewsViewController, I have a pop over that appears by clicking a button. It displays a Table View from PopOver.
Now, in the method tableView:didSelectRowAtIndexPath in PopOver, I want it to modify some properties of TopNewsViewController and re-push it to the navigation stack. I am implementing the method as follows:
TopNewsViewController *topNewsViewController = [[[TopNewsViewController alloc] initWithNibName:@"TopNewsViewController" bundle:nil] autorelease];
NSString *feedStr = [rootViewController.feeds objectAtIndex:rowNumber];
[rootViewController release];
NSArray *thisFeed = [NSArray arrayWithObjects:feedStr, nil];
topNewsViewController.feeds = thisFeed;
topNewsViewController.pageTitle = [categories objectAtIndex:rowNumber];
[self.navigationController pushViewController:topNewsViewController animated:YES];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
I realized that this does not work because I am using "self.navigationController", when PopOver is not a ViewController, and instead is a UITableViewController. I tried doing "topNewsViewController.navigationController" instead but it did not work.
Anyone has any suggestions on how to implement it? Help/suggestions are greatly appreciated!