title: Problem with playing a sound when a button is clicked
body: <p>in my code:</p>
  
  <pre><code>#import "MyViewController.h"
  #import "AVFoundation/AVAudioPlayer.h"
  
  
  - (IBAction)playSound{
      AVAudioPlayer *myExampleSound;
  
      NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"];
  
      myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL];
  
      myExampleSound.delegate = self;
  
      [myExampleSound play];
  
  }
  </code></pre>
  
  <p>But it is showing a warning that Class MyViewController does not implement AVAudioplayerDelegate.</p>
  
  <p>Anyone please help. I had included the AVFoundation.Framework.</p>