iOS 4: Remote controls for background audio

后端 未结 7 1394

I\'m currently attempting to set up background audio for an app I\'m developing for iOS 4. The app doesn\'t have a dedicated music player viewController, howeve

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 18:49

    The documentation examples are a bit misleading, but there is no need to subclass anything anywhere. The correct place to put remoteControlReceivedWithEvent: is in the application delegate, as it remains in the responder chain regardless of whether the app is in the foreground or not. Also the begin/end receiving remote control events should be based on whether you actually need the events, not on the visibility of some random view.

提交回复
热议问题