" wait_fences:无法接收回复:10004003"? [英] "wait_fences: failed to receive reply: 10004003"?

查看:92
本文介绍了" 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 ,并确保调用 [super viewDidAppear:] 。当您不在屏幕上时,不应执行动画(将出现)。 -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天全站免登陆