Currently I add a viewcontroller using pushViewController:animated:
and now from within that new one would like to call a method inside my \"parent\"-controller
self.navigationController.viewControllers
Returns an array of all the view controllers in the navigation stack. The current view controller is at the top of the stack, the previous view controller is the next one down, and so forth.
So, you can do the following:
NSArray *viewControllers = self.navigationController.viewControllers;
int count = [viewControllers count];
id previousController = [viewControllers objectAtIndex:count - 2];
if ([previousController respondsToSelector:@selector(myMethod)])
[previousController myMethod];
If you know what class the previous controller is you can cast it explicity instead of using id.