资源介绍
- (void)applicationDidBecomeActive:(UIApplication *)application
{
if ([[AVAudioSession sharedInstance] isOtherAudioPlaying]) {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategorySoloAmbient error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];
} else {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];
}
}