Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically make the iPhone vibrate [duplicate]

Possible Duplicate:
Making the iPhone vibrate

How can you programmatically make the iPhone vibrate?

Any ideas, or tutorial links appreciated.

like image 436
Sam Jarman Avatar asked Jan 17 '10 08:01

Sam Jarman


1 Answers

You can use

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);  

Note that you need to add the AudioToolbox framework and import the following header file:

#import <AudioToolbox/AudioServices.h> 
like image 56
Henrik P. Hessel Avatar answered Sep 29 '22 01:09

Henrik P. Hessel