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

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -