如何使用加速度计在 iphone 的屏幕上绘画? [英] How to use accelerometer for paint on a screen in iphone?
本文介绍了如何使用加速度计在 iphone 的屏幕上绘画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 iPhone 开发的新手,我正在开发一个应用程序,我必须使用加速度计在屏幕上绘画.请帮帮我,如果能帮我的话,这是否可行.
I am new in iPhone development, I am developing an app in which I have to use accelerometer for painting on screen . Please help me out is this can be done-able if so help me.
推荐答案
您正在寻找陀螺仪鼠标,3 行代码.观看此视频,陀螺仪鼠标在 37:00-38:25 出现.
You are looking for the gyro mouse, 3 lines of code. Watch this video, the gyro mouse is presented at 37:00-38:25.
长话短说,您需要陀螺仪(CMRotationRate).
So long story short, you need the gyroscopes (CMRotationRate).
这篇关于如何使用加速度计在 iphone 的屏幕上绘画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文