I'm working on my first iPad app that utilizes a popover view, and I'm trying to figure out how to update the "parent" view once an item is selected from the popover.
Right now, the popover view is called as follows (from within FeedsDetailViewController.m):
This particular view is also used in a Split View as the main navigation controller. When it's used as the navigation controller in the SplitView, the following code is called to update the "detail" portion of the SplitView (from within FeedsViewController.m):
That code works fine in the split view, but I can't figure out how to update the "detail" view controller (FeedsDetailViewController) from the popover. Addressing self.navigationController.parentViewController doesn't do any good; is there a different "parent" view I might need to push the new FeedsDetailViewController into?
Thanks in advance for any help you can provide....
Right now, the popover view is called as follows (from within FeedsDetailViewController.m):
Code:
FeedsViewController* content = [[FeedsViewController alloc] initWithTitle:@"Title" withNavigationTitle:@"NavTitle" withPropertyFile:propFile withNavType:@"popover"];
UIPopoverController* aPopover = [[UIPopoverController alloc]
initWithContentViewController:content];
aPopover.delegate = self;
[content release];
// Store the popover in a custom property for later use.
self.popoverController = aPopover;
[aPopover release];
[self.popoverController presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
This particular view is also used in a Split View as the main navigation controller. When it's used as the navigation controller in the SplitView, the following code is called to update the "detail" portion of the SplitView (from within FeedsViewController.m):
Code:
UISplitViewController *split = (UISplitViewController *)self.navigationController.parentViewController;
UINavigationController *nav = [split.viewControllers objectAtIndex:1];
FeedsDetailViewController *detail = [nav.viewControllers objectAtIndex:0];
// Push in the new article
FeedsDetailViewController *fdvController = [[FeedsDetailViewController alloc] initWithDictionary:itemDictionary withPropertyFile:passPropFile];
[detail.navigationController pushViewController:fdvController animated:YES];
[fdvController release];
That code works fine in the split view, but I can't figure out how to update the "detail" view controller (FeedsDetailViewController) from the popover. Addressing self.navigationController.parentViewController doesn't do any good; is there a different "parent" view I might need to push the new FeedsDetailViewController into?
Thanks in advance for any help you can provide....