使用加速度计 [英] Use accelerometer

查看:53
本文介绍了使用加速度计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用iPhone设备中的加速度计在Z轴上旋转 UIImageView .请帮助我提供任何源代码.

How to rotate the UIImageView on z-axis with using accelerometer in iPhone device. Please help me out with any source code.

推荐答案

可以这么说,z方向指向您.尝试访问视图层.它应该有一个z参数.

The z-direction points towards you, so to say. Try accessing the layer of the view. It should have a z-parameter.

这是加速度计示例代码...

here is the accelerometer example code ...

http://www.devx.com/wireless/Article/44799/1954

也有这样的帖子

如何旋转响应iPhone的加速度计的图像?

这篇关于使用加速度计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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