Question

I would like to be able to vibrate the iPhone for a specified duration. Using the AudioToolbox framework, it will vibrate for about 2 seconds, when I use this code:

AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);

This does the job, but I'd rather vibrate for a shorter (or longer) duration depending on how the user performed the action, not to mention the benefits this could offer to game developers.

Thanks for any ideas.

Was it helpful?

Solution

You could set a NSTimer or a for loop that would set off a vibration every two seconds and make it seem like a long vibrate. Not sure if Apple would allow this tough.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top