开发者

How to detect Shake Gesture while application in Background?

开发者 https://www.devze.com 2023-03-02 12:00 出处:网络
I\'m currently working on a music player app, and like the iPod application, I would like to shuffle songs with shake gesture.

I'm currently working on a music player app, and like the iPod application, I would like to shuffle songs with shake gesture.

I'm implementing motion methods like Apple recommends to, and in foreground everything works fine.

- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event;
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event;
- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event;

But I just 开发者_Python百科can't figure out how to call those methods from background. I've looked all over the internet, and there's not threads about this.

first things first: is it possible?

Thanx!


It's not possible now, whether you use iOS 4 or any lower SDK version.

0

精彩评论

暂无评论...
验证码 换一张
取 消