Can't beginReceivingRemoteControlEvents in iOS

前端 未结 4 1490
孤城傲影
孤城傲影 2021-02-14 17:04

In my app i want let user to control audio playback in background. I set backGround modes in .plist, and in plays in bg just like i wanted.But i can\'t get any response from tou

4条回答
  •  一整个雨季
    2021-02-14 18:02

    Review this sample code from Apple for an example of usage. Likely your primary view controller is not actually becoming the first responder. An alternative usage is to place this code in your Application Delegate (which will always be the first responder) and respond to these events before they have had a chance to propagate, and potentially be consumed by other responders.

提交回复
热议问题