使用Mac os Lion的自动布局功能时出现问题 [英] Problem using autolayout feature of Mac os Lion

查看:188
本文介绍了使用Mac os Lion的自动布局功能时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用autolayout功能为我的mac应用程序。我已启用自动展开我的主窗口&在扩展窗口中,只有我的窗口大小扩展但不是子视图。在应用程序启动时,我在控制台中收到以下消息

I am using autolayout feature for my mac app.I have enabled autolayout for my mainWindow & also for its child views.But on expanding window , only my window expands in size but not the child views.And on app launch I get following message in the console

布局仍然需要更新调用 - [WebHTMLView布局]。WebHTMLView或其一个超类可能会覆盖没有调用超级的布局,或者,在更新的过程中可能有脏的布局两者都是可编程自动布局中的编程错误。如果某些Pre-Cocoa Autolayout类有一个名为layout的方法,那么前者很可能出现,但是应该是固定的。

"Layout still needs update after calling -[WebHTMLView layout]. WebHTMLView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed."

请帮助!

推荐答案

日志可能与您的问题无关。

The log is probably not related to your issue.

视图,你希望保持固定在你的窗口的一侧,但不是。您应该看到绘制为蓝色的视图的约束。它将保持固定,如果,只有当你看到一个约束,那里固定。您可以使用编辑器>对齐和编辑器>定位菜单显式添​​加约束。

For your issue, select a view that you expect to stay pinned to the side of your window but isn't. You should see the constraints involving that view drawn as blue. It'll stay pinned if and only if you see a constraint there that pins it. You can explicitly add constraints with the Editor > Align and Editor > Pin menus.

日志是因为web视图实现了该方法并需要rev,但它大多是[1]无害的。

The log is because web view implements that method and needs to rev, but it's mostly[1] harmless.

[1]可能在web视图中的html布局最终触发的次数比必要的更多。

[1] Possibly html layout in the web view ends up triggering more often than necessary.

这篇关于使用Mac os Lion的自动布局功能时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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