문제

How can I make my app automatically stop the iPod music - if it's playing - as soon as the app is started? I need this so when people listen to music and want to use the app they don't need to pause the music first before opening the app.

도움이 되었습니까?

해결책

Simple enough, import the MediaPlayer framework and tell the iPodMusicPlayer to stop or pause.

[[MPMusicPlayerController iPodMusicPlayer] stop];
[[MPMusicPlayerController iPodMusicPlayer] pause];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top