开发者

iPhone :remoteioplayer how to know that the song has finished playing

in iPhone App I am playing song with remoteioplayer. while playing a song how to know that the song has finished playing. I want set some event on that poing开发者_开发百科?


Implement AVAudioPlayerDelegate.

It has following delegate method from which you can know song has finished playing.

- (void) audioPlayerDidFinishPlaying: (AVAudioPlayer *) player
                        successfully: (BOOL) flag {
    NSLog(@"Finished");
}

You can refer detailed documentation.

Hope it helps.


Implement the AVAudioPlayerDelegate methods in your class. The method

- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag

will be fired when the AVAudioPlayer stops playback.

More info here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜