title: NSNotificationCenter calling two times
body: <p>Below is what I have.</p>
  
  <h2>MainViewController.m</h2>
  
  <pre><code>- (IBAction)sideMenuAction:(id)sender {
      NSLog(@"login==sideMenuAction");
      [[NSNotificationCenter defaultCenter] postNotificationName:@"ShowMySideMenuNotification" object:self];
  }
  </code></pre>
  
  <h2>NotificationListener.m</h2>
  
  <pre><code>-(void)viewDidLoad {
      [[NSNotificationCenter defaultCenter] removeObserver:self name:@"ShowMySideMenuNotification" object:nil];
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(adjustShowMenu) name:@"ShowMySideMenuNotification" object:nil];
  }
  
  -(void) adjustShowMenu {
      NSLog(@"notification adjustShowMenu=");
  }
  </code></pre>
  
  <p>Now when I click side menu button in MainViewController, what I was expecting is call adjustShowMenu from NotificationListener once, however it is called twice.</p>
  
  <p>Below is the NSLog for the same.</p>
  
  <pre><code>2015-01-20 12:27:30.798 abc[699:169314] login==sideMenuAction
  2015-01-20 12:27:30.798 abc[699:169314] notification adjustShowMenu=
  2015-01-20 12:27:30.799 abc[699:169314] notification adjustShowMenu=
  </code></pre>
  
  <p>What I was expecting is </p>
  
  <pre><code>2015-01-20 12:27:30.798 abc[699:169314] login==sideMenuAction
  2015-01-20 12:27:30.798 abc[699:169314] notification adjustShowMenu=
  </code></pre>
  
  <p>Any idea what is going wrong?</p>
  
  <p><strong>Note:</strong> I also tried in viewDidAppear instead of viewDidLoad, but its giving same result.</p>
  
  <p>When I searched online, many answers asked to removeObserver. I did same, but still twice notification is getting called.</p>