audioPlayerDidFinishPlaying not being called at end of audio
Hi,
I have implemented the AVAudioPlayerDelegate in my header file.
#import <AVFoundation/AVAudioPlayer.h>
@interface PlayAudioViewController : UIViewController<AVAudioPlayerDelegate>{
...}
I've also implemented the delegate method in the implementation file:
-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player succesfully:(BOOL) flag
{
if(flag == YES)
{
self.playButton.enabled = YES;
}
}
But for some reason the audioPlayerDidFinishPlaying method is not being called. I've read through the documentation and can't figure out why?
I have implemented the AVAudioPlayerDelegate in my header file.
#import <AVFoundation/AVAudioPlayer.h>
@interface PlayAudioViewController : UIViewController<AVAudioPlayerDelegate>{
...}
I've also implemented the delegate method in the implementation file:
-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player succesfully:(BOOL) flag
{
if(flag == YES)
{
self.playButton.enabled = YES;
}
}
But for some reason the audioPlayerDidFinishPlaying method is not being called. I've read through the documentation and can't figure out why?
iOS 4