【发布时间】:2015-05-15 20:30:19
【问题描述】:
我正在快速编写一个基于 sprite kit 的应用程序,需要使用振动进行简短的触觉反馈
所以我首先导入了 AudioToolbox 并使用了这个
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
它运行良好,但振动时间过长,无法控制此持续时间。
然后经过一番搜索,我在这里阅读了凯文曹的答案:
Are there APIs for custom vibrations in iOS?
但不幸的是,AudioServicesPlaySystemSoundWithVibration 私有函数只能在 iOS 6 中使用。
那么还有其他可能的方法吗?
【问题讨论】: