简体   繁体   English

根据表格设置UIContainer视图高度

[英]Set UIContainer View Height According to table

Can I adjust the height of container view (or UIContainer) according to size of the tableview inside the view controller for storyboards? 我可以根据情节提要的视图控制器内的tableview的大小来调整容器视图(或UIContainer)的高度吗?

Thanks. 谢谢。

Yes, you could first add a constraint for the height of the tableView. 是的,您可以首先为tableView的高度添加一个约束。

Then simply add a constraint 'Equal Heights' between the tableView and the containerView. 然后,只需在tableView和containerView之间添加一个约束“ Equal Heights”。

You'll then have to change the 'multiplier' value of the constraint according to what you want exactly. 然后,您必须根据所需的条件更改约束的“乘数”值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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