相关疑难解决方法(0)

如何在后台应用时检测摇动手势?

我目前正在开发一个音乐播放器应用程序,就像iPod应用程序一样,我想用摇晃手势来播放歌曲.

我正在实施像Apple推荐的运动方法,并且在前台一切正常.

- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event;
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event;
- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event;
Run Code Online (Sandbox Code Playgroud)

但我无法弄清楚如何从后台调用这些方法.我看过整个互联网,并没有关于这个的线索.

首先要做的事情是:有可能吗?

感谢名单!

iphone objective-c motion-detection gesture-recognition handshake

1
推荐指数
1
解决办法
1895
查看次数