且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

不等式约束模糊性

更新时间:2022-10-19 19:01:00

对于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.