简体   繁体   中英

Autolayout UIView Proportional height with Minimum height requirement

I've created one Tab bar bottom view with proportional height related to main superview.
在此输入图像描述

在此输入图像描述

Whereas, tab bar bottom view height in 6+ -> 59, in 6 -> 53, in 5 -> 45 & in 4s -> 38. It's working proportionally fine. But what if I want this tab bar view's height should be minimum 46, at maximum it should work proportionally.

So based on the above heights on different devices, I want to achieve 6+ -> 59, 6 -> 53, 5 -> 46 & in 4s -> 46.

So what could be a possible solution in Auto layout to achieve this.
Thanks in Advance.

您应该将高度约束添加到46以上,其优先级为1000.然后将顶部空间约束的优先级设置为750。

尝试向标签栏添加额外的高度约束“大于或等于”46。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM