Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想以编程方式更改 iPhone 播放音量。我在网上找到了这段代码:
MPMusicPlayerController *musicPlayer = [MPMusicPlayerController iPodMusicPlayer]; musicPlayer.volume = 1.0;
但是,它会弹出扬声器图标的视觉覆盖,这是我不想要的。我能想到的一种方法是检查音量是否已更改,然后尝试删除该覆盖。
有没有办法实现这一点或改变音量而不出现覆盖?