title: Problem with NSNotification & Dismissing modal View Controllers
body: <p>So, I have a tabbarcontroller, and I pass a notification to <code>dismissModalViewController</code> when a particular <code>tabBarItem</code> is touched. </p>
  
  <p>It is working well and the modal View Controller is dismissed. But I want to change it in a particular way, and it does not work as I expect it to...</p>
  
  <p>I have the observer initialized before the notification is posted. These are the tabBarItems - </p>
  
  <pre><code>NSArray *viewControllerss = [[NSArray alloc] initWithObjects: myProfileDataViewController, 
  sampleViewController,reminderInfoViewController, nil];
  
  
  [self.tabBarContr setViewControllers:viewControllerss animated:YES];
  self.tabBarContr.selectedIndex = 2;
  </code></pre>
  
  <p>I send a notification on the <code>viewWillAppear</code> of <code>sampleViewController</code> and when I choose that tabBarIcon, it dismisses the TabBarController.</p>
  
  <p>BUT I want the <code>sampleViewController</code> to be on the left most of the <code>UITabBar</code>.</p>
  
  <p>And so I add it like </p>
  
  <pre><code> NSArray *viewControllerss = [[NSArray alloc] initWithObjects: sampleViewController,
   myProfileDataViewController, reminderInfoViewController, nil];
  </code></pre>
  
  <p>THIS DOES NOT DISMISS TAB BAR CONTROLLER.</p>
  
  <p><em><strong>Note:</em></strong> <em>Please see the order in which NSArray is initialized.</em></p>
  
  <p><em>The notification is posted in the <code>viewWillAppear of</code>sampleViewController` and observer in the respective  view controller which presents the modal view controller</em></p>