iPhone app increase shake gesture sensitivity
Asked Answered
B

1

9

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:)];  
      }
 } 
Beget answered 5/3, 2012 at 5:47 Comment(3)
I don't think we can change sensitivity of Shake Gesture.Pepi
Also to get more help, post some more code on how you are implementing it.Pepi
Check answer hereCanvasback
L
2

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.

Lessard answered 5/3, 2012 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.