gpt4 book ai didi

ios - UIViewControllerView 内的 UITableView 意外边距

转载 作者:行者123 更新时间:2023-12-01 18:57:27 27 4
gpt4 key购买 nike

我有正常的UIViewController在我的 Storyboard上使用标准 UIView仅包含一个 child - UITableView
UIView 之间添加约束时和 UITableView (等宽,等高,垂直间距 0 顶部布局指南,水平间距 0 用于前导边距)因此我的表格 View 应该填充它的父级。

相反,我的表格 View 似乎有左边距和上边距(16 和 64)。 Size Inspector显示 TableView Alignment Rectangle如下 x=16,y=64,width=600,height=600 尽管我所有的约束都将常量设置为 0。当我尝试手动编辑时 Alignment Rectangle我不断收到Misplaced Views尝试恢复以前的值的警告。

我知道这种奇怪行为的原因可能是什么吗?

最佳答案

单击要删除边距的 View 。打开Contraint Editor取消选中 Prefer Margin relative :

enter image description here

关于ios - UIViewControllerView 内的 UITableView 意外边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25767095/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com