开发者

IOS - Pause and Unpause Currently Playing Music

开发者 https://www.devze.com 2023-03-28 06:06 出处:网络
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 th

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!


[[MPMusicPlayerController systemMusicPlayer] play];
[[MPMusicPlayerController systemMusicPlayer] pause];
0

精彩评论

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