I am just wondering how you repeat a AVAudioPlayer?
Do you mean 'How do I set an AVAudioPlayer
to repeat a sound?' I assume?
if so:
Notice that AVAudioPlayer class has a property called numberOfLoops
. If you set this property
to a negative integer value, when you play the AVAudioPlayer
, it will loop until stopped. You can set the number of loops you'd like to play by making numberOfLoops
a positive integer.
Hope that helps!