开发者

avaudioplayer-two background music problem

I have two .xibs in my app. The first .xib contains a round rectangle button that opens second .xib. ViewDidLoad 开发者_如何学编程method of second .xib starts a background music(mp3 file) using AVAudioPlayer and then shows an animation by running a sequence of images. Now second .xib button has a "back button".

If I click on the back button before animation and audio stops, reach on first xib and click on round rectangle button again then it starts two background music files.

How do I fix it?

Also, how do you stop music if a song is already playing on ipod when app's background music starts?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜