简体   繁体   中英

Why does my UITableView need to be below UIButton in the scene outliner

I have an UIView with a UIButton and a UITableView. I constrained the UIButton (left, top, right, bottom) to (0,0,0,-) with a height of 50px. Below i constrained the UITableView (left, top, right, bottom) to (0,0,0,0) so that the screen would be filled with both views as such:

TableView上方的按钮

In this case the UIButton is above the UITableView in the scene outliner: 场景概述(1)

However whenever I reorder the view in the UIView so that the TableView is above the UIButton in the Scene Outliner it also moves my UITableViewCells but not my UITableView:

TableView下面的按钮 在此处输入图片说明

The constraints are the same and nothing is moved except for the layering in the scene outliner. Why do my UITableViewCells move down whenever i place my UITableView above my UIButton?

当选中视图控制器属性中的“调整滚动视图插入”时,Interface Builder会执行此操作。

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