0
如何發揮audioplayer時位置的速度大於20,計時開始五二個,忽然位置 速度(從20 T0 0速度下降)等於零,它播放音頻player.I試試這個,但沒有任何發生plz幫助我。這裏是我的代碼播放音頻播放時的位置速度降低
int i;
- (void)locationUpdate:(CLLocation *)location{
speedLabel.text = [NSString stringWithFormat:@"%.2fmph",[location speed]*2.236936284];
if (location.speed >= 10)
{
[self performSelector:@selector(doThis) withObject:nil afterDelay:5];
if (location.speed ==0) {
[audioPlayer play];
}
}
}
-(void)doThis{
if(i %5 == 0)
{
[CLController.locMgr startUpdatingLocation];
}
}
什麼增加「'我'」? –