如何在iPhone中连续振动? [英] how to run vibrate continuously in iphone?
问题描述
在我的应用程序中,我使用以下编码模式来振动我的iPhone设备
In my application I'm using following coding pattern to vibrate my iPhone device
包含: AudioToolbox
框架
标题文件:
#import "AudioToolbox/AudioServices.h"
代码:
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
我的问题是,当我运行我的应用程序时,它会振动,但只是第二次,但我想要它会不断振动直到我停止它。
My problem is that when I run my application it gets vibrate but only for second but I want that it will vibrate continuously until I will stop it.
怎么可能?
推荐答案
有很多例子说明了如何使用私有CoreTelephony调用来执行此操作: _CTServerConnectionSetVibratorState
,但由于您的应用程序 因滥用振动功能而被拒绝。只是不要这样做。
There are numerous examples that show how to do this with a private CoreTelephony call: _CTServerConnectionSetVibratorState
, but it's really not a sensible course of action since your app will get rejected for abusing the vibrate feature like that. Just don't do it.
这篇关于如何在iPhone中连续振动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!