IOS Music Control in Background
I am trying to find the solution to have the control of play/pause when my app is playing the own music in Background. I am using AVAudioPlayer and didn´t find the way to implement this controls. When the app is "close"开发者_如何学编程 the music play perfectly but I have to open the app again to pause or change music when needed.
Any solution ?
If you're running iOS 4 you can try putting the app in the background whilst playing music, and then pressing the home button twice for the 'multitasking' bar. Swipe the bar to the right, which shows you the normal playback controls for Music, YouTube, etc.
If you use the AVAudioPlayer I'm quite sure you can use those same controls to control your app's playback of media.
Bryan
*EDIT does using the remote on the iPhone headphones work?
精彩评论