在Xcode 5和Objective-C中,剪辑视图的帧将在运行时错误时不同 [英] Frame for clip view will be different at runtime error in Xcode 5 and Objective-C

查看:153
本文介绍了在Xcode 5和Objective-C中,剪辑视图的帧将在运行时错误时不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在使用Xcode 5.0和Cocoa在OS X应用程序上构建,当我使用很多对象,从文本字段,文本视图,单选按钮,复选框等...并运行模拟器,它看起来工作成功。但是,有两个警告标记有黄色三角形,读取错位视图 - 框架的剪辑视图将在运行时不同 MainMenu。 xib 文件。

I'm now building on OS X app using Xcode 5.0 and Cocoa, and when I used a lot of objects ranging from text field, text view, radio buttons, to check box, etc... and ran the simulator, it looks like working successfully. However, there are two warnings which are tagged with yellow triangles that read Misplaced view - Frame for "clip view" will be different at runtime in MainMenu.xib file.

错误是什么意思?如何解决这些警告?最后,当我销售应用程序时,我应该打扰工作更难以尝试删除这些警告吗? (或者苹果仍然允许开发者销售应用程序,即使它有一些警告,但仍然听起来工作?)

What does the error mean? And how can I resolve the warnings? And finally, should I bother to work a bit harder to try to remove those warnings when I get to sell the app? (or does Apple still allow developers to sell an app even when it has some warnings but nonetheless sounds working?)

为了您的信息,我没有写任何代码任何我的文件 - 只是将对象拖动到Interface Builder,并编辑和对齐这些对象,只是运行它,这这本书(但本书假设使用Xcode 4)。

For your information, I didn't write any code in any of my files yet - just dragged objects out to Interface Builder, and edited and aligned those objects a bit and just ran it, which this book does (but this book assumes to use Xcode 4).

谢谢。

推荐答案

Xcode5默认使用自动布局。警告意味着您的某些UI元素没有足够的约束设置,因此当您操作UI(例如调整窗口大小)时,内容可能与您预期的不同。

Xcode5 defaults to using Auto-Layout. The warnings mean that some of your UI elements do not have enough constraints set, so when you manipulate the UI (for example resize the window) things may look different than you intended.

当在Interface Builder中打开 MainMenu.xib 时,组件部分应出现一个黄色箭头。单击该箭头,会出现一个视图,说明违规元素。每个都有另一个黄色的元素,带来一个上下文菜单与建议的修复。

When you open MainMenu.xib in Interface Builder, a yellow arrow should appear in the component section. Click that arrow and a view appears that explains the offending elements. Each has another yellow element that brings up a context menu with suggested fixes.

这篇关于在Xcode 5和Objective-C中,剪辑视图的帧将在运行时错误时不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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