不等式约束模糊性 [英] Inequality Constraint Ambiguity

查看:475
本文介绍了不等式约束模糊性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题在使用自动布局和约束调整UIView的大小。
我想更改原点(小于或等于原始)和宽度(大于或等于原始),但我得到这个:不等式约束模糊


$ b $





解决方案

对于3.5显示,所以我不得不在组件之间,我想在较小的屏幕上缩小一个约束不等式(大于或等于)其中我指定最小所需的大小,1000优先级,其他约束是等式约束与特定



这种方式Xco​​de停止抱怨和布局在较小的屏幕上正确地重新定位。



>


i've a problem in resizing a UIView with Autolayout and constraints. I'd like to change the origin (less than or equal of original) and the width (greater than or equal of original) but I got this: Inequality Constraint Ambiguity

Do you have idea for solve this?

thanks

解决方案

I tried to make more than 1 vertical spacing constraint shrink for 3.5" displays, so I had to make 2 constraints between components that I wanted to shrink on smaller screen. One constraint was inequality (greater or equal) where I specified minimum required size, with 1000 priority, other constraint was equality constraint with specific size that is suitable for 4" screen, but with lower priority of 250.

This way Xcode stopped complaining and layout repositioned properly on smaller screen.

这篇关于不等式约束模糊性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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