Xcode错误:调用-display无效 [英] Xcode error: calling -display has no effect

查看:89
本文介绍了Xcode错误:调用-display无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我加载我的SpriteKit应用程序时,它都会记录此错误:< CAMetalLayer:0x15f57fa70>:调用-display无效。,并且它无法正常显示很多物体。我尝试重新创建场景并删除我的代码,两者都没有做任何事情。有一段时间我认为这可能是新的Xcode 7和iOS 9测试版的一个错误,但现在我已经尝试了两者的GM版本并且问题仍然存在,可能情况并非如此。

Whenever I load my SpriteKit app, it logs this error: <CAMetalLayer: 0x15f57fa70>: calling -display has no effect., and it doesn't properly display many objects. I have tried recreating the scene and removing my code, both of which have done nothing. For a while I thought this might have been a bug with the new Xcode 7 and iOS 9 beta, but now that I have tried it with the GM version of both and the problem persists, that probably isn't the case.

推荐答案

检查所有 SKNodes的 zPosition 。事实证明,在SpriteKit的实现中发生了一些变化, SKNode 对象不再始终按照它们添加到父节点的顺序进行呈现。在我确定所有 SKNodes 都有正确的 zPosition 后,一切都恢复正常。

Check the zPosition of all your SKNodes. As it turns out, something changed in SpriteKit's implementation, and SKNode objects are no longer always rendered in the order they were added to their parent nodes. After I made sure all my SKNodes had the correct zPosition, everything went back to normal.

如果这没有帮助,请查看开发论坛的这篇文章

If that doesn't help, check this post from the dev forums.

这篇关于Xcode错误:调用-display无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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