0

I have a menu that like a roulette, it's spinning like a whell. To catch the events i'm using touch began/move.

How can i add it an acceleration ? I want to register to an acceleration event, when user touch an item and slide??

vadim
  • 119
  • 3
  • 14

1 Answers1

0

This might help

Listing 4-4  Receiving an accelerometer event
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
UIAccelerationValue x, y, z;
x = acceleration.x;
y = acceleration.y;
z = acceleration.z;

// Do something with the values.
}
prashant
  • 1,920
  • 14
  • 26
  • How can i know from this code a numerical size of the acceleration? so check whether it's bigger\smaller from value? – vadim Sep 04 '12 at 05:56
  • http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIAcceleration_Class/Reference/UIAcceleration.html#//apple_ref/doc/uid/TP40006901 – prashant Sep 04 '12 at 06:06
  • Maybe i wrote it wrong...i need the angular acceleration of the spinning wheel, the "power" of spinning,Is this code event can help me? – vadim Sep 04 '12 at 07:51