Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone app increase shake gesture sensitivity

In my iPhone App I have used shake gesture it is working but it requires lots of efforts to shake.

Is there any way to make it more sensitive?

Here is the code

 - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
 {
      if (motion == UIEventSubtypeMotionShake)
      {
          [self performSelector:@selector(startPressed:)];  
      }
 } 
like image 414
ios Avatar asked Mar 05 '12 05:03

ios


Video Answer


1 Answers

The isnt a way to do it directly as far as I'm aware.

One way to get around this would be to use the accelerometer's readings, and then decide for yourself if it was a shake, you would be able to fine tune it yourself if so.

like image 97
Amit Shah Avatar answered Sep 22 '22 16:09

Amit Shah