title: NSNotificationCenter with arguments
body: <p>I am implementing an Audio based application. In that I am playing two different sounds using two AVPlayers. I need to do different actions once the sounds played. For this I used NSNotifications. But my problem is I am not able to find the Notifications related to which player. My notifications code and selector code is as follows please any one suggest me what the mistake I did.</p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(playingItemDidEnd:)
                                               name:AVPlayerItemDidPlayToEndTimeNotification
                                             object:iPodPlayer]; 
  
  
  [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(playingItemDidEnd:)
                                               name:AVPlayerItemDidPlayToEndTimeNotification
                                             object:applicationPlayer ];
  
  - (void)playingItemDidEnd:(NSNotification *)notification 
  {
        id object= [notification object];
  
       if(object==ipodPlayer)
       {
         printf("\n Notification from iPod Player ");
  
       }
       else if(object==applicationPlayer)
       {
         printf("\n Notification from application Player ");
       }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks in advance,
  Chandra.</p>