按下主页按钮时如何显示红色状态栏? [英] How to display a red status bar when the home button is pressed?

查看:90
本文介绍了按下主页按钮时如何显示红色状态栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的重新编码应用程序正在进行某些录制时,按下主屏幕按钮时如何显示红色状态栏?

How do I display a red status bar when the home button is pressed while my recoding app is doing some recording?

我检查了以下问题:在录制时如何在iOS状态下隐藏红色条?

但是,我使用Core Audio和Extended Audio File Services进行记录。我找不到任何适当的文档以编程方式执行此操作。

However, I use Core Audio and Extended Audio File Services to do recording. I am unable to find any proper documentation to programatically do this. Any help or pointers will be appreciated.

推荐答案

我相信从


按下主屏幕按钮时状态栏为红色

您在询问是否可以设置当您的应用程序在后台运行时,状态栏颜色变为红色。

you are asking whether you can set the status bar color to red when your app in background.

红色状态栏表示应用程序正在录制音频,并且由系统设置。当您的应用程序在后台运行时,sdk中没有任何内容支持我们更改状态栏颜色。

The red status bar is an indication that an application is recording audio, and it is set by the system. There is nothing in sdk that supports us to change the status bar color when your application is in the background.

请参见此官方论坛主题(需要登录)解决此问题的位置,回答该问题的人是Apple员工。

See this official forum thread (login required) where this question is addressed, and the guy who answeres it is an Apple employee.

编辑:

如果您的应用尝试在后台录制,但是您的问题是状态栏上看不到红色,这可能是因为您的音频录制会话即将终止/暂停。尝试注册一个完成处理程序以进行录制,然后查看其启动时间是否比预期的启动时间早。

If your app is trying to record in the background, but your problem is that red color is not visible on status bar, then one reason can be because your audio recording session is getting terminated/paused. Try and register for a completion handler for your recording, and see if it fires earlier than you expects it to fire.

这篇关于按下主页按钮时如何显示红色状态栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆