title: Sharing NSMutableDictionary in AppDelegate
body: <p>I'm very new to Objective C so please bear with me. I have been searching through a lot threads but still couldn't find suitable answer for my case yet I believe this question has been asked over and over. I found a lot of tutorials how to use AppDelegate for sharing string but I can't figure out how to use it to share NSMUtableDictionary.  </p>
  
  <p>I want to share one NSMutableDictionary between two classes where I add data to the NSMutableDictionary in one class and read it it another. I'm using AppDelegate class to store the data.</p>
  
  <p><strong>AppDelegate.h</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @interface AppDelegate : UIResponder &lt;UIApplicationDelegate&gt;
  @property (strong, nonatomic) UIWindow *window;
  @property (nonatomic,retain) NSMutableDictionary *myArray;
  @end
  </code></pre>
  
  <p><strong>AppDelegate.m</strong></p>
  
  <pre><code>#import "TestResults.h"
  @synthesize myArray;
  </code></pre>
  
  <p><strong>TestResults.h</strong></p>
  
  <pre><code>@interface TestResults : UIViewController {
  singletonObj * sobj;
  }
  </code></pre>
  
  <p><strong>TestResults.m</strong></p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
      NSMutableDictionary *myArrayFromAppDelegate = appDelegate.myArray;
      [myArrayFromAppDelegate setValue:@"aaa" forKey:@"bbb"];
      NSLog(@"%@", myArrayFromAppDelegate);
  }
  </code></pre>
  
  <p>When i do NSLog it return an empty array. Where did I go wrong?</p>