我想要确定摇动手势以及设备的左右上下方向。我使用我如何确定在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