iPhone SDK shake and vibrate -
How can vibrations be used while moving the iPhone? Here's my code:
#pragma mark - - (zero) accelerometer: (UIAccelerometer *) Accelerometer did the speed: (UIAcceleration *) acceleration {{if (acceleration.x> KAccelerationThreshold) acceleration .y & gt; KAcalAltration Threshold || Acceleration.exe> KAkcAlertation Threshold) {** // Vibrate it! You can do this: Audio service place system (kSystemSoundID_Vibrate);
Be sure to ensure the audio toolbox framework.
Comments
Post a Comment