这是正确的方式来检查当前播放时间AVAudioPlayer's
。检查avaudioplayer的当前播放时间
[audioPlayer play];
float seconds = audioPlayer.currentTime;
float seconds = CMTimeGetSeconds(duration);
我怎样才能代码之后
[audioPlayer play];
,当currentTime的是等于11秒,然后
[self performSelector:@selector(firstview) withObject:nil];
和的firstView后当currentTime的是等于23秒
[self performSelector:@selector(secondview) withObject:nil];
Th为你的答案。
安排一个检查时间的并行计时器。 'currentTime'返回一个NSTimeInterval变量,所以'double seconds = audioPlayer.currentTime;'是正确的。 – 0xDE4E15B 2012-03-01 23:09:44