博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Debugging Auto Layout
阅读量:6880 次
发布时间:2019-06-26

本文共 1364 字,大约阅读时间需要 4 分钟。

Types of Errors错误类型

Errors in Auto Layout can be divided into three main categories:自动布局中的错误可分为三大类:

  • Unsatisfiable Layouts. Your layout has no valid solution. For more information, see .永无止境的布局。您的布局没有有效的解决方案。更多信息,见永无止境的布局。

  • Ambiguous Layouts. Your layout has two or more possible solutions. For more information, see .暧昧的布局。您的布局有两个或多个可能的解决方案。有关更多信息,请参见。

  • Logical Errors. There is a bug in your layout logic. For more information, see .逻辑错误。在布局逻辑中有一个bug。有关更多信息,请参见逻辑错误。

Most of the time, the real problem is just determining what went wrong. You added the constraints you thought you needed, but when you ran the app, things did not turn out as you had hoped.

大多数时候,真正的问题只是决定出了什么问题。你添加了你认为需要的约束,但是当你运行应用程序时,事情并没有如你所希望的那样发展。

Usually, as soon as you understand the problem, the solution is obvious. Remove conflicting constraints, add missing constraints, and adjust tied priorities so that there is a clear winner. Of course, getting to the point where you can easily understand the problem may take some trial and error. Like any skill, it gets easier with practice.

通常,一旦你理解了这个问题,解决方法是显而易见的。删除冲突的约束,添加缺失的约束,并调整并列优先级,以便有一个明确的赢家。当然,到达一个点,你可以很容易地理解这个问题可能会采取一些尝试和错误。像任何技能,它变得更容易与实践。

Sometimes, however, things get more complicated. That’s where the  chapter comes in.

然而,有时候事情变得更加复杂。这就是调试技巧和提示章节进来。

转载于:https://www.cnblogs.com/zyingn/p/AutoLayout__DebuggingAutoLayout.html

你可能感兴趣的文章
CentOS:安装ssh
查看>>
Retrofit 抽象工厂模式
查看>>
python基础===monkeytype可以自动添加注释的模块!
查看>>
中序线索二叉树算法 解决 把二元查找树转变成排序的双向链表
查看>>
ExtJs xtype类型介绍
查看>>
Flex两页面间的传值问题总结
查看>>
结对开发之首尾相连二维数组求最大子数组
查看>>
linux内核之网络协议栈
查看>>
SAN实现
查看>>
自定义过滤器及标签
查看>>
I.MX6 change boot partition 1 to User area
查看>>
struts2使用验证文件实现校验
查看>>
试题 H: 人物相关性分析 第十届蓝桥杯
查看>>
[Inside 快訊] Ruby 成為國際標準了
查看>>
centos7下安装tomcat
查看>>
一周总结
查看>>
HDU 5312:Sequence
查看>>
POJ 3393:Lucky and Good Months by Gregorian Calendar 年+星期 模拟
查看>>
WPF之Binding基础十 使用RelativeSource作为Binding的源
查看>>
接口测试-学习记录
查看>>