swift 只要在需要播放的地方前面加一句 : try? AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) 就行了