Understanding protocol implementation with example UIAlertViewDelegate
<p>There are two classes A and B : </p>

<p>@interface A : NSObject &lt; UIAlertViewDelegate > {  ... } @end</p>

<p>@interface B {  ... }</p>

<p>A will use B via creating B and use it. </p>

<p>In B, there are chances to create UIAlertViewDialog, and do some user interactions. </p>

<p>I think that it is reasonable to implement clickedButtonAtIndex in class A, because A is declared to confirm to UIAlertViewDelegate. But the true is that we should implement in B.</p>

<blockquote>
  <ul>
  <li>(void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)buttonIndex
  {   //bla bla  }</li>
  </ul>
</blockquote>

<p>I really can not understand what is the true cause to confirm protocol like this case. </p>

<p>Thanks in advance. </p>
