gpt4 book ai didi

ios - 在 UIViewController 中显示 uitableview 的问题 - 未对齐

转载 作者:行者123 更新时间:2023-11-28 21:48:39 24 4
gpt4 key购买 nike

我将 uitableview 组件拖到 Storyboard 中的 UIViewController

显示为

enter image description here

然后当我运行应用程序时,旁边有一个空格。如何防止这种情况? enter image description here

注意:最初此应用程序启用了 autoLayout,后来我将其删除。希望这个错误没有影响。

最佳答案

在您的 TableView 上添加约束。

如果你不知道怎么做,这里有一个简单的步骤:

  1. 右键单击或 ctrl 并拖动 tableview(在左侧列表中)到查看
  2. 选择 Top space to top layout guide Repeat with Bottom
    底部空间布局指南
  3. 前导空格重复
    容器边距
  4. 重复 Trailing space to container margin

这应该可以解决您的问题。

关于ios - 在 UIViewController 中显示 uitableview 的问题 - 未对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29121565/

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