“wait_fences:未能收到回复:10004003"? [英] "wait_fences: failed to receive reply: 10004003"?

查看:27
本文介绍了“wait_fences:未能收到回复:10004003"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于以下代码行,我第一次(也是第一次)加载我的视图时出现这个神秘错误:

I get this cryptic error the first time (and only the first time) my view is loaded due to the following line of code:

- (void)viewWillAppear:(BOOL)animated
{
    [textField becomeFirstResponder];
}

因此存在明显的延迟(约 3 – 4 秒,即使在模拟器上),这让我的应用感觉无响应.有谁知道如何解决这一问题?我在 Apple 的网站上找不到任何关于它的文档,或者在此处或 Google 上找不到任何解决方案.

There is a noticeable (~3 – 4 second, even on the simulator) delay due to this that makes my app feel unresponsive. Does anyone know how to fix this? I can't find any documentation on it on Apple's site, or any solutions here or on Google.

奇怪的是,如果我将该行放在 -viewDidAppear: 而不是 -viewWillAppear: 中,则会发生相反的情况;也就是说,不是只在第一次显示键盘时打印错误,以后再也不打印错误,而是不是第一次打印错误,而是每次都打印.这让我很头疼.

Strangely, the opposite situation happens if I put the line in -viewDidAppear: instead of -viewWillAppear:; that is, instead of printing the error only the first time the keyboard is shown and never again, the error is not printed the first time but every time after. This is causing a major headache for me.

推荐答案

覆盖 -viewDidAppear:,而不是 -viewWillAppear,并确保调用 [superviewDidAppear:].当您不在屏幕上时(将出现"),您不应执行动画.-viewDidAppear: 文档解释说你必须调用 super 因为他们有自己的事情要做.

Override -viewDidAppear:, not -viewWillAppear, and make sure to call [super viewDidAppear:]. You should not perform animations when you are not on screen ("will appear"). And the -viewDidAppear: docs explain that you must call super because they have their own things to do.

这篇关于“wait_fences:未能收到回复:10004003"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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