简体   繁体   English

如何删除警告“按钮的框架在运行时将有所不同”。

[英]How to Remove the Warning “Frame for Button will be different at run time.”

I am using Xcode 5 developer preview. 我正在使用Xcode 5开发人员预览。 When I change or add a in the XIB file from interface builder Xcode shows this warning: 当我在界面构建器中更改或添加一个XIB文件时,Xcode会显示以下警告:

Frame for Button will be different at run time. Button的Frame在运行时会有所不同。

How do I remove this warning? 如何删除此警告?

This warning is displayed when the actual position of the element is different in your storyboard than while running the app. 当故事板中元素的实际位置与运行应用程序时不同时,会显示此警告。

You can select that element and then hit Option + Cmd + = . 您可以选择该元素,然后点击Option + Cmd + =

This will update the position of the element in the storyboard and that warning will go away. 这将更新故事板中元素的位置,并且警告将消失。

You can also find this option in menu under Editor > Resolve Auto Layout Issues > Update Frames . 您也可以在Editor > Resolve Auto Layout Issues > Update Frames下的菜单中找到此选项。

Probably you have created a conflict in constraints. 可能你在约束中产生了冲突。 To resolve it Open nib file Go to editor > Resolve all constraint issues> from there you can reset all/desired constraints. 解决它打开nib文件转到编辑器>解决所有约束问题>从那里你可以重置所有/所需的约束。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在运行时自动调整UIButton的大小。 - Auto resize UIButton at run time. fbconnect iphone:我想每次登录。 怎么做? - fbconnect iphone : i want to login every time. how to do that? 当我们在for循环内创建Button框架时,现在我们要删除或清理按钮框架,那该怎么办呢? - When we create Button frame within for loop then now we want to remove or clean button frame then how can do this? iPhone SDK如何在两次不同的按钮单击上添加/删除UIButton - iPhone sdk how to add/remove UIButton on two different button clicks 如何在iOS的运行时创建动态标签和按钮? - How to create dynamic label and button on run time in iOS? 每次用户按下按钮时如何在UICollection上传递不同的数据? - How to passing different data on UICollection every time user push the button? Game Center身份验证可能需要很长时间。 如何解决呢? - Game Center authentication can take a very long time. How to work around it? 在运行时按钮未显示在MapKitView上 - Button not showing on MapKitView in the run time 如何比较iPhone中的按钮框? - How to Compare the button frame in iPhone? 如何从iPhone的wordnik示例中删除此警告? - How to remove this warning from wordnik sample for iPhone?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM