How to pause program execution when pause button is pressed
<p>I   want in this action whenever pause button is pressed it should pause the program execution as well because right now when i pause the audio file it still keeps on displaying views one after the other. I want that to be paused as well.</p>

<pre><code> -(void)playpauseAction:(id)sender 
{

  if  

  ([audioPlayer isPlaying]){

 [sender setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateSelected];

 [audioPlayer pause];

  } else {

 [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal];

[audioPlayer play];

[self performSelector:@selector(displayviewsAction:) withObject:nil afterDelay:11.0];

  }  

}
</code></pre>

<p>Anyone know how i can pause the program execution as well.</p>
