I have a view that is sized to the width of the screen with a 1x1 ratio of width to height (matching height). I have a view below that square view that is a set height from the bottom. What I want is for the top view to be centered in the blank space. So I would love to just set 1 constraint for the top and 1 constraint for the bottom to say, match. Then if there are x number of points of available, each constraint should be size x / 2.
So far, I haven't been able to find a constraint setting that can do this. Could someone describe how to do this?
通常,您添加2个透明视图,上方1个,下方1个,将边缘固定到现有视图,并将2个新视图设置为相等的高度。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.