Okay, I understand how to work delegation in a modal view to send a message to the parentviewcontroller but what if I wanted to do that with 2 views that dont have that parent-child relationship?
I have a navigation controller that flips over a modal view and then that modal view pushes a new view controller. How do I let that pushed view controller talk to the navigation controller. The modal view code that I have been using places this in the parent:
-(IBAction)pressedUnitAddy {
UnitAddyView *unitVC = [[UnitAddyView alloc] init];
unitVC.delegate = self;
UINavigationController* theNavController = [[UINavigationController alloc]initWithRootViewController:unitVC];
theNavController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:theNavController animated:YES];
[unitVC release];
[theNavController release];
}
-(void)didDismissUnitAddyView { [self dismissModalViewControllerAnimated:YES]; }
....and then I call the didDismissUnitAddyView from the UnitAddyView. Now, I am not trying to dismiss any views with what I am trying to do but I do want that pushed view controller to be able to speak to the navigation controller. How would I do that?