开发者

Sound playing notification on IPhone

开发者 https://www.devze.com 2023-03-16 22:36 出处:网络
When playing sound on IPhone using AVAudioPlyer, How to be notified when reaches certain time during the play开发者_如何学Pythoning?There is delegate method when AVAudioPlayer is finished successfully

When playing sound on IPhone using AVAudioPlyer, How to be notified when reaches certain time during the play开发者_如何学Pythoning?


There is delegate method when AVAudioPlayer is finished successfully,

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

If you want to notify user when AVAudioPlayer reaches certain time, you can implement NSTimer using following method.

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;
0

精彩评论

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