如何捕捉摇动的开始?

问题描述

| 我已经实现了
 - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
当某人结束iPhone的震动时捕获震动,但是我需要确定震动的开始,怎么办?     

解决方法

        尝试阅读以下内容: http://devinsheaven.com/cocoa-touch-tutorial-receiving-using-the-shake-api-for-iphone-os-3/     ,        
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {
    

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...