2014-01-10 64 views
0

我想要確定搖動手勢以及設備的左右上下方向。我使用我如何確定在ios上左右上下搖動手勢?

-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration方法

,但我沒有得到的抖動此方法的方向。 任何人都可以提出任何算法或通過它可以檢測到的東西。

感謝

+0

我相信你需要爲這個核心運動框架閱讀用於本教程。 – Bamsworld

+0

http://stackoverflow.com/questions/6223296/how-to-detect-direction-of-shake-in-iphone http://stackoverflow.com/questions/7253058/horizo​​ntal-and-verticle-shake-count-使用加速度計在iphone-ipad http://stackoverflow.com/questions/1018770/how-to-determine-the-direction-of-a-iphone-shake – Vincent

+0

@Vincent能夠檢測左右運動,但不會上下,而且在向上和向右運動時都很難檢測到。 – Dhara

回答

相關問題