如何展开UIView并在展开时移动其他组件

How to expand UIView and move other components when expanded

我有一个包含 filter_View

的视图控制器

和一个tableView_Players

.

当我按下按钮时"Filter la recherche"

我希望 Filter_View 以这种方式扩展

结果将表视图向下移动

怎么做?提前致谢:)

如果您使用的是自动布局,请执行以下操作:

1) 设置从 tableView 到 filterView 的垂直间距。

2) 设置filterView的Height Constraint并设置其outlet

3) 最初是高度限制,例如heightOfFilterview.constant = x

4) 单击过滤器 la 按钮时设置 heightOfFilterView.constant = y(随心所欲)。