完成清单 4-9 和 4-10 的 CMMotionManager 示例

发布于 2024-09-10 16:42:14 字数 702 浏览 3 评论 0原文

http://developer.apple.com/ iphone/library/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MotionEvents/MotionEvents.html 清单 4-9 和 4-10 我尝试运行代码,但没有成功,我遇到了 gyroHandler 的问题。

有人可以发布完整代码的示例,而不需要对示例列表进行太多更改吗?意思是,我想看看该列表是如何使用的。

我认为应该有一些声明,但我不知道是什么。在 .h 文件中声明 CMGyroHandler 不起作用。

这是一个与 CMMotionManager 和 iPhone 4 上的陀螺仪类似的问题。但示例代码已更改,未使用 gyroHandler,我想使用按钮来启动和停止陀螺仪,如示例中所示。

感谢您的帮助!

http://developer.apple.com/iphone/library/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MotionEvents/MotionEvents.html listing 4-9 and 4-10
i tried to run the code but with no success, i run into a problem with gyroHandler.

can someone post an example of a completed code, without much changing the sample listings? meaning, i'd like to see how the listing was meant to be used.

I assume there should be some declarations but i can't figure out what. declaring CMGyroHandler in .h file didn't work.

it's a similar question to CMMotionManager and the Gyroscope on iPhone 4. but there the sample code was changed, gyroHandler wasn't used and I'd like to use the button to start and stop the gyro, like in the exmaple.

thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云淡风轻 2024-09-17 16:42:14

去看看 WWDC 2010“茶壶”演示吧!
登录 ADC
-> WWDC 2010 会议视频
->在 iTunes 中查看
->下载示例代码包(230 MB),

但要小心 coremotion,它仍然感觉像测试版

go checkout the WWDC 2010 "teapot" demo!
log into ADC
-> WWDC 2010 session videos
-> view in iTunes
-> download sample code package (230 MB)

but beware of coremotion, it still feels like beta

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文