How do I display an UIImageView while a sound is playing?
<p>I'm trying to display an image while a sound is playing. I can get it to appear, but I'm having trouble making it disappear once the sound has finished playing.</p>

<h3>My code:</h3>

<pre><code>-(IBAction)guitarChord:(id)sender
{
    if (theAudio.playing == YES) {
        theAudio.stop;
        theAnimation.stop;
    } else {
        theAudio.play;   
        theAnimation.play;   
    }
}
</code></pre>

<p>I'm using AVAudioPlayer. </p>

<p>Any ideas what I am doing wrong? </p>

<p>How do I detect a sound has stopped? </p>
