我想要確定搖動手勢以及設備的左右上下方向。我使用我如何確定在ios上左右上下搖動手勢?
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
方法
,但我沒有得到的抖動此方法的方向。 任何人都可以提出任何算法或通過它可以檢測到的東西。
感謝
我想要確定搖動手勢以及設備的左右上下方向。我使用我如何確定在ios上左右上下搖動手勢?
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
方法
,但我沒有得到的抖動此方法的方向。 任何人都可以提出任何算法或通過它可以檢測到的東西。
感謝
ü
https://www.captechconsulting.com/blog/john-morrison/ios-getting-started-accelerometer-data http://wwwbruegge.in.tum.de/lehrstuhl_1/home/98-teaching/tutorials/505-sgd-ws13-tutorial-core-motion https://www.inkling.com/read/learning-ios-programming-alasdair-allan-2nd/chapter-9/the-core-motion-framework
我相信你需要爲這個核心運動框架閱讀用於本教程。 – Bamsworld
http://stackoverflow.com/questions/6223296/how-to-detect-direction-of-shake-in-iphone http://stackoverflow.com/questions/7253058/horizontal-and-verticle-shake-count-使用加速度計在iphone-ipad http://stackoverflow.com/questions/1018770/how-to-determine-the-direction-of-a-iphone-shake – Vincent
@Vincent能夠檢測左右運動,但不會上下,而且在向上和向右運動時都很難檢測到。 – Dhara