如何在iphone的屏幕上使用加速度计绘画? [英] How to use accelerometer for paint on a screen in iphone?

查看:207
本文介绍了如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆