- (void)applicationWillEnterForeground:(UIApplication *)application
{
UIViewController *galleryViewController = self.window.rootViewController;
[galleryViewController doSomething];
}
Edit: This is just an example of how you will get a reference to your GalleryViewController, if it is your rootViewController. If you are within NavigationController or TabBarController, you then need to first get a reference to your navigationController or tabBarController and then cascade it's viewControllers.
If you have a complex VC structure, it is probably easier to subscribe to notifications as Wain points out. The credit should go to his faster response.