iPhone:实现摇动手势
答
如果您的视图控制器使第一响应
[self becomeFirstResponder]
和实施motionEnded:withEvent:方法
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.type == UIEventSubtypeMotionShake) {
NSLog(@"Shake is detected");
}
}
从这个链接,通过给出的答复:叶兰塔尔莫尔工作正常我的问题 – ios 2011-03-09 11:38:10