by Prasanna Vignesh
17. June 2010 13:15
Two simple way to detect the shake of iPhone,
1. Using UIAccelerometer.
2. Using Motion Events.
Using UIAccelerometer
Check this Link.
Using Motion Events
In your UIViewController add the following methods.
- (void)motionBegan:(UIEventSubtype)...
[More]
by Prasanna Vignesh
17. June 2010 12:06
#define kAccelerationThreshold 2.2
//Somewhere in initialization
UIAccelerometer *accel = [UIAccelerometer sharedAccelerometer];
accel.delegate = self;
accel.updateInterval = 1.0f/10.0f;
//Method to detect Shake...
[More]