I am using this code buy getting compile errors for the audio line. Does anyone know why?
- (void)handleTimer:(NSTimer *)timer
{
self.counter--;
self.timerLabel.text = [NSString stringWithFormat:@"%ld", self.counter];
if (self.counter == 0)
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
}
You most likely forgot to import a framework for it
#import <AudioToolbox/AudioToolbox.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With