objective-c iOS 播放视频之后,熄灭屏幕,再打开屏幕的时候,多媒体中心显示这个app的名字(我不想显示这个app),可以不显示或者关闭多媒体中心吗?
iOS 播放视频之后,熄灭屏幕,再打开屏幕的时候,多媒体中心显示这个app的名字
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
fhongchan 2016-08-01 08:25关注-
(void)applicationDidEnterBackground:(UIApplication *)application {
dispatch_async(dispatch_get_main_queue(), ^{
AVAudioSession *session = [AVAudioSession sharedInstance];
// 类型是:播放和录音
[session setCategory:AVAudioSessionCategoryPlayback error:nil];
// 而且要关闭 音频会话
[session setActive:NO error:nil];
});// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报-