9
在我的iPhone應用程序中,我使用了搖動手勢,但它需要大量努力才能搖動。iPhone應用程序增加搖動手勢靈敏度
這裏是代碼
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake)
{
[self performSelector:@selector(startPressed:)];
}
}
請幫助和建議。
謝謝
我不認爲我們可以改變Shake手勢的敏感度。 – 2012-03-05 06:01:29
也爲了獲得更多的幫助,發佈一些關於如何實現它的代碼。 – 2012-03-05 06:08:20
檢查答案[here](http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone) – 2012-03-05 09:21:49