天天看點

iOS 靜音狀态下播放音頻

swift 隻要在需要播放的地方前面加一句 :

try? AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)

就行了

繼續閱讀