当 AVAudioPlayer 停止播放时,我想知道并更改 UIImageView。我正在努力,但我还想不通。有什么办法吗。。我的代码如下
if ([[NSFileManager defaultManager] fileExistsAtPath:ttsOutWav]) {
audioPath1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:ttsOutWav] error:&error];
if (!error) {
[audioPath1 play];
NSLog(@"should be played");
}
else {
NSLog(@"Error in creating audio player:%@",[error description]);
}
}
else{NSLog(@"such file doesnt exist");}