简体   繁体   English

摇动方法iPhone SDK

[英]Shake method iphone sdk

I am using iPhone sdk's motionended method to get the shake effect on 3.0. 我正在使用iPhone SDK的motionended方法在3.0上获得震动效果。

The problem I am having is that the it works find on the first shake which I play a view, but once the video finished and I shake the device again it doesn't work. 我遇到的问题是,它可以在我播放视图的第一次摇动时找到,但是一旦视频播放完毕并再次摇动设备,它就无法工作。

Can anyone help me with this. 谁能帮我这个。

Thanks 谢谢

Something else, like the video player, may have become the first responder after the first time you shake the device. 在您第一次摇晃设备后,诸如视频播放器之类的其他东西可能已成为第一响应者。 This could be preventing the shake events from getting to your view or controller. 这可能会阻止震动事件到达您的视图或控制器。 You may need to manually restore the first responder status to the element handling the shake by sending it -becomeFirstResponder once the video has finished. 视频播放完后,您可能需要通过将其发送给-becomeFirstResponder来将第一响应者状态手动恢复为处理该抖动的元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM