title: AvAudioPlayer "stop" not working
body: <p>Ok here's my problem. I have an app in which there is music playing on startup, i want to implement a simple uibutton in the settings page which stops the audio from playing.</p>
  
  <p>Header:</p>
  
  <pre><code>int musicof;
  IBOutlet UIButton *music;
  @property (nonatomic, strong) AVAudioPlayer *theAudio;
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>- (IBAction)music:(id)sender{
  if (musicof == 1){
      musicof = 2;
  [music setBackgroundImage:[UIImage imageNamed:@"moff.png"] forState:UIControlStateNormal];
  [music setImage:[UIImage imageNamed:@"moff.png"] forState:UIControlStateNormal];
      [self.theAudio stop];
  }
  else{
      musicof = 1;
      [music setBackgroundImage:[UIImage imageNamed:@"music.png"] forState:UIControlStateNormal];
      [music setImage:[UIImage imageNamed:@"music.png"] forState:UIControlStateNormal];
      [self.theAudio play];
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and incase you haven't guessed already the integer "musicof" is there to keep a record of the buttons state.</p>
  
  <p>This however isn't working at all, me pressing the button results in nothing but the icon changing. any suggestions?</p>