In my app, I select one song from tableView and played in default player, and then when i back to playlist (i.e tableview) and select another song then BOTH songs played simultaneously.
How I solve this problem ? I want to play when another song select then that selecte开发者_如何学Pythond song must played and previous one should be stopped.
Please HELP. Thanks in advance.
Hurray Problem solved....
Problem: Multiple songs overlapping in player.
Reason : Multiple instance creation of AVAudioPlayer.
Solution: Create only one instance at launch, and when play called then [audioplayer stop] then play (using flags avoid multiple creation).
Thanx to all.
精彩评论