views:

10

answers:

1

I have a view that plays an animation and an audio clip. if the user leaves the view and then returns the audio replays from the point where they left the view.

I simply want the audio and the animation to start over as if it was their first time coming to the view.

so the audio would stop and the animation would stop. then the viewDidLoad would load it all up on the users next visit.

I can't seem to find a solution. I'm sure it's a simple fix. any help would be great.

A: 

I found out from someone else that if you're using AVAudioPlayer, which I am, then you can reset currentTime to 0. playback resumes from the start of the audio clip each time.

hanumanDev