objective c - How do I make iPhone vibrate? -


i using code buy getting compile errors audio line. know why?

- (void)handletimer:(nstimer *)timer  {     self.counter--;     self.timerlabel.text = [nsstring stringwithformat:@"%ld", self.counter];     if (self.counter == 0)     {         audioservicesplaysystemsound(ksystemsoundid_vibrate);     } } 

you forgot import framework

#import <audiotoolbox/audiotoolbox.h> 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -