title: Post notification from specific object - cocoa touch
body: <p>So I have this function inside <code>NotificationManager</code> class.</p>
  
  <pre><code>-(void) postNotificationForClassName:(NSString*)className withObjects:(NSArray*)objects withError:(BOOL)withError
  {
  
      notificationName = [NSString stringWithFormat:@"didLoad%@",className];
  
  
      [[NSNotificationCenter defaultCenter] 
          postNotificationName:notificationName object:self];
  }
  </code></pre>
  
  <p>now, let's say I have 2 classes , A and B.</p>
  
  <p>from A's method foo() I do the following:</p>
  
  <pre><code>[[NotificationManager sharedManager]
      postNotificationForClassName:@"A" withObjects:objects withError:NO]
  </code></pre>
  
  <p>from B's method goo() I do the following:</p>
  
  <pre><code>[[NotificationManager sharedManager] 
      postNotificationForClassName:@"A" withObjects:objects withError:NO]
  </code></pre>
  
  <p>Now, I'm curious what should I do in case I want to listen only to notifications being posted from Class A.</p>
  
  <p>Is this suppose to work ? </p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] 
      addObserver:self 
         selector:@selector(didLoadData:) 
             name:@"didLoadA" object:classAObject];
  </code></pre>
  
  <p>Cause I'm assuming that when I'm calling </p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] 
      postNotificationName:notificationName object:self];
  </code></pre>
  
  <p>and I pass the "self", then the "self" will be the <code>NotificationManager</code> and not the class A or B that called the <code>NotificationManager</code> method.</p>
  
  <p>Am I right or wrong here ? and if I'm right, is there a way to do what I want to accomplish?</p>
  
  <p>Thanks!</p>