如何在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).