如何使用加速度计在 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).