您的位置:首页 > 其它

how to make iphone shake

2011-08-05 23:32 260 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: