title: Objective-c multicasting delegates
body: <p>I create new tabbed view project in xcode, in appdelegate I created a protocol</p>
  
  <p>.h file</p>
  
  <pre><code>@protocol myProtocol &lt;NSObject&gt;
  -(void)myProtocolMethodOne;
  @end
  .
  .
  .
  @property (weak) id&lt;myProtocol&gt; mypDelegate;
  </code></pre>
  
  <p>.m file</p>
  
  <pre><code>@synthesize mypDelegate;
  .
  .
  .
  //Inside didFinishLaunchingWithOptions
  [mypDelegate myProtocolMethodOne];
  </code></pre>
  
  <p>In firstViewController &amp; secondViewController (both are displayed as two different tab) I did this in both</p>
  
  <pre><code>AppDelegate *ad = (AppDelegate*)[[UIApplication sharedApplication]delegate];
      [ad setMypDelegate:self];
  .
  .
  .
  -(void)myProtocolMethodOne
  {
      NSLog(@"1st VC");
      [[self tabBarItem]setBadgeValue:@"ok"];
  }
  </code></pre>
  
  <p>The code is working perfectly but only secondViewController is responding. </p>
  
  <p>I am looking for a broadcasting and listener kind of mechanism using delegates not notifications. </p>
  
  <p>I searched a lot but did find any solutions except <a href="https://github.com/robbiehanson/XMPPFramework/wiki/MulticastDelegate" rel="nofollow">this</a> but code is advance for me to understand, so I am taking a step by step approach to understand this by starting form a simple project. Please help me regarding this. How both viewcontrollers can respond to delegate at same time, what should I do?</p>