ios 状态栏找不到缓存的时间字符串图像。正在渲染

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49586341/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:41:12  来源:igfitidea点击:

Status bar could not find cached time string image. Rendering in-process

iosswift4.1xcode9.3

提问by mac_eric

I get the above runtime message after I upgraded to Swift4.1 and Xcode 9.3. Before the upgrade I did not have this message in my console window.

升级到 Swift4.1 和 Xcode 9.3 后,我收到了上述运行时消息。在升级之前,我的控制台窗口中没有此消息。

Status bar could not find cached time string image. Rendering in-process.

状态栏找不到缓存的时间字符串图像。正在渲染。

comes up every few minutes as long as I have the App running.

只要我运行应用程序,每隔几分钟就会出现一次。

It sees to me there is no negative side effect, my App is running, as usual, I have not seen any problems.

它在我看来没有负面影响,我的应用程序正在运行,像往常一样,我没有看到任何问题。

I use the standard Status Bar, have not changed to modify it in any way.

我使用的是标准状态栏,没有以任何方式修改它。

Question 1:Would there be a problem originating from this warning under situations i have not come across yet?

问题 1:在我尚未遇到的情况下,此警告是否会导致问题?

Question 2:Does anyone know how I can get rid of this warning?

问题 2:有谁知道我怎样才能摆脱这个警告?

采纳答案by Lal Krishna

This bug/debug note is present in iOS SDK bundled with Xcode 9.3+

此错误/调试说明存在于与 Xcode 9.3+ 捆绑的 iOS SDK 中

Update: notfixed in Xcode 9.4.1 (9F2000)
Update: notfixed in Xcode 10 (10A255)
Update: notfixed in Xcode 11 betas

更新:固定在Xcode 9.4.1(9F2000)
更新:固定在Xcode 10(10A255)
更新:固定在Xcode 11个贝塔

I think you can safely ignore it. New versions of iOS/macOS sometimes contain informational debugging messages, and they generally get removed at the next release.

我认为你可以放心地忽略它。新版本的 iOS/macOS 有时包含信息性调试消息,它们通常会在下一个版本中被删除。

回答by sRoy

Same issue was occurring for me too. To overcome this, I did this

同样的问题也发生在我身上。为了克服这个,我这样做了

Goto Target -> Deployment Info -> Unchecked 'Hide status bar'

转到目标 -> 部署信息 -> 取消选中“隐藏状态栏”

This one resolved my issue. For me, this was the 'Deployment Info' setup.

这个解决了我的问题。对我来说,这是“部署信息”设置。

enter image description here

在此处输入图片说明

回答by mehdi

In my case, it was hiding navigation bare by

就我而言,它隐藏了导航

self.navigationController?.isNavigationBarHidden = false

self.navigationController?.isNavigationBarHidden = false

When you are hiding the navigation bar, it hides status bar too!. just use

当您隐藏导航栏时,它也会隐藏状态栏!。只是使用

self.navigationController?.navigationBar.isHidden = true

self.navigationController?.navigationBar.isHidden = true

instead. And you will have your status bar back.

反而。您将恢复状态栏。

回答by PeterT

I am also seeing this warning appear, and in answer to Question 1, I am also seeing potentially very nasty behaviour associated with it.

我也看到此警告出现,并且在回答问题 1 时,我还看到了与之相关的潜在非常讨厌的行为。

Running something close to a basic sample animated triangle Metal app, but with

运行接近于基本示例动画三角形 Metal 应用程序的东西,但使用

renderPassDescriptor.colorAttachments[0].loadAction = .load

such that the frame isn't cleared every frame. What seems to be happening is that every other time the warning message is logged, iOS also gets some part of its management of graphics state confused so that I witness a violent flashing of parts of the image (which then goes away again later).

这样帧就不会每帧都被清除。似乎正在发生的事情是,每隔一次记录警告消息时,iOS 也会对其图形状态管理的某些部分感到困惑,因此我目睹了图像部分的猛烈闪烁(然后再次消失)。

How likely this situation would be to emerge in a 'real' app I'm not sure, but it's definitely not something you want users to end up seeing.

我不确定这种情况在“真实”应用程序中出现的可能性有多大,但这绝对不是您希望用户最终看到的。

I haven't fixed the problem here thus far; 'Hide status bar' and 'Requires full screen' settings don't help.

到目前为止,我还没有解决这个问题;“隐藏状态栏”和“需要全屏”设置无济于事。

回答by Anton Tropashko

To answer Question 2 drawing upon PeterT answer that addresses Question 1: not only you can not get rid of this warning, but you mustn't, cause it means that the underlying problem is anything, but benign. At least in some scenarious.

回答问题 2 借鉴解决问题 1 的 PeterT 答案:不仅您无法摆脱此警告,而且您也不能,因为这意味着潜在的问题是任何问题,但都是良性的。至少在某些情况下。

This also means that the DEC Field Circus Engineer dance swapping the wheels that flat in meta info for the project would rightfully make you look like a clown.

这也意味着 DEC Field Circus Engineer 的舞蹈交换项目元信息中平坦的轮子会让你看起来像个小丑。

回答by Esteban Vallejo

I was able to get rid of this warning, by checking the "Requires Full Screen" in Target-> Deployment Info.

通过检查Target-> Deployment Info 中的“需要全屏”,我能够摆脱这个警告。

Checking this option may have some side-effects in iPad, so you should do it having this in mind.

选中此选项可能会在 iPad 中产生一些副作用,因此您应该考虑到这一点。