Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经实施了
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
当有人结束iPhone的震动时捕捉震动,但我需要确定震动的开始,怎么办?
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {
尝试阅读:
http://devinsheaven.com/cocoa-touch-tutorial-receiving-using-the-shake-api-for-iphone-os-3/