how to make iphone shake


1.Add the AudioToolbox framework to your target.


2. In the file you intend to trigger a vibration, import the AudioToolbox header file:
#import <AudioToolbox/AudioToolbox.h>


3. Finally, call the following line to make the device vibrate:
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);




 needed to change an iphone setting .


 For sounds , had vibrate turned off. 


 change vibrate to ON under sounds

你可能感兴趣的:(header,File,iPhone,import)