Question: I have a app with TabBar, under the main tabbar there are navigation controllers, under these there are 'branches' of tableviewcontollers.

How can I make two unrelated, non segue-connected, under two different tab icons viewcontrollers exchange information between them?

Tried with delegating but I can't get the instance variable to the delegator from the delegatee (there's no relation between them, no segue.destinationviewcontroller etc)

any ideas?

practical:
the app shows list of subitems (the parent tableview has the items), andon the other tab the recent items that were selected are getting added (but maxiumum 10 and sorted by most recent).. been breaking my *\**\* on it...

thanks

Answer: 
I find `NSNotification`s not the best way to do this since you do couple the unrelated TableViewControllers. I think the flow of information in an application is crucial.

The solution I would personally favor is having a central class, that manages the global data for your application. This can be the `AppDelegate` class or an arbitrary manager class that manages the flow of data and "pulls the strings" and mediates between the different independent ViewControllers.

**Example:**  

Using this code you can get hold of your `UITabBarController` and set your class as the delegate of your ViewControllers etc.:

```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    UITabBarController *rootTabBarController = (UITabBarController *)self.window.rootViewController;

    MyFirstTableViewController *firstVC = [rootTabBarController.viewControllers objectAtIndex:0];
   firstVC.delegate = self; // Get informed about events in the first ViewController

    MySecondTableViewController *secondVC = [rootTabBarController.viewControllers lastObject]; // Assuming you only have two Tabs

    // Once you have the rootTabBarController you can cast it to the corresponding ViewController and access any nested UIViewControllers

    return YES;
}

#pragma mark - MyFirstTableViewControllerDelegate
-(void)firstTableViewController:(MyFirstTableViewController *)sender didSomethingFancy:(MyFancyObject *)fancy{
    // Do stuff like fetching some data, based on the event from the first ViewController
    // Maybe tell the secondVC to refresh its data etc. etc.
}

```
You can use @property and @synthesize to create default getters and setters. You can aso create your own getters and setters manually.