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
Post a Comment