问题
I am working on a IOS app that I want to have the functionality to pause and unpause music that is currently playing through the ipod, just like the ipod's play/pause button. Is there anyway to do that through IOS? The only answers I have found for this is for dealing with songs and sounds played locally through the app.
Any help would be fantastic. Thanks so much!
回答1:
[[MPMusicPlayerController systemMusicPlayer] play];
[[MPMusicPlayerController systemMusicPlayer] pause];
来源:https://stackoverflow.com/questions/7043365/ios-pause-and-unpause-currently-playing-music