【发布时间】:2014-02-21 02:51:30
【问题描述】:
我需要一个功能来检测抖动,而不必在每个视图控制器中添加- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event。
但是当我将函数添加到 appDelegate 时,没有检测到运动。
我试过NSNotificationCenter 无济于事。我有大量的 viewController,给它们添加 motionEnded 方法会很乏味……
有什么想法吗?
【问题讨论】:
标签: ios iphone motion-detection