开发者

completing example of CMMotionManager example listing 4-9 and 4-10

http://developer.apple.com/iphone/library/开发者_StackOverflow中文版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!


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜