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 or increase the sensitivity?
here is the code
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake)
{
[self performSelector:@selector(startPressed:)];
}
}
Please help and Suggest.
Thanks
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.
来源:https://stackoverflow.com/questions/9562168/iphone-app-increase-shake-gesture-sensitivity