Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autolayout UIView Proportional height with Minimum height requirement

I've created one Tab bar bottom view with proportional height related to main superview.
enter image description here

enter image description here

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.

like image 705
Kiran Jasvanee Avatar asked Feb 22 '16 12:02

Kiran Jasvanee


2 Answers

You should add height constraint to more than 46 and its priority is 1000.And then set priority of top space constraint to 750.

like image 170
Lumialxk Avatar answered Nov 11 '22 07:11

Lumialxk


Try adding an extra height constraint to the tab bar that is "greater than or equal to" 46.

like image 26
Tometoyou Avatar answered Nov 11 '22 07:11

Tometoyou