title: Delegate AVAudioPlayer for audioPlayerEndInterruption method
body: <p>My <strong>ViewController</strong> name is <strong>Mainviewcontroller</strong> in which i m doing all the actions of <strong>AVAudioplayer</strong>.</p>
  
  <p>If in h file i do </p>
  
  <pre><code>@class MainViewController;
  
  @protocol MainViewControllerDelegate 
  
  -(void)audioPlayerBeginInterruption:(AVAudioPlayer *)audioPlayer;
  
  -(void)audioPlayerEndInterruption:(AVAudioPlayer *)audioPlayer;
  
  @end
  
  @interface MainViewController : UIViewController &lt;UIActionSheetDelegate, InfoDelegate, AVAudioPlayerDelegate&gt; 
  </code></pre>
  
  <p>I am confused in the above statement i m supposed to do <strong>AVAudioPlayerDelegate</strong> or <strong>MainViewControllerDelegate</strong></p>
  
  <p>If i do <strong>@protocolAVAudioPlayerDelegate</strong> then i <strong>get warning in yellow stating that duplicate protocol definition of AVAudioPlayer is ignored</strong></p>
  
  <p>when i have not defined <strong>@protocolAVAudioPlayer</strong> anywhere else.</p>
  
  <p>Another confusion i have is that i m supposed to declare these methods in h file first only then implement in m file</p>
  
  <pre><code>-(void)audioPlayerBeginInterruption:(AVAudioPlayer *)audioPlayer;
  
  -(void)audioPlayerEndInterruption:(AVAudioPlayer *)audioPlayer;
  </code></pre>
  
  <p>Please help.</p>