使设备振动

时间:2012-12-03 09:42:59

标签: objective-c ios

我想通过代码来振动iOS设备。

我使用了以下方法。但我无法做到这一点。

  • 1)AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);

  • 2)AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

当我在ipod或ipad上运行游戏时。

1 个答案:

答案 0 :(得分:0)

iPad不支持物理振动。只有iPhone和更新版本的iPod才能使用这些代码。

相关问题