【问题标题】:UITableView in Swift not recognizing UINavigationBar, padding is off and part of tableview is hiddenSwift 中的 UITableView 无法识别 UINavigationBar,填充已关闭,部分 tableview 被隐藏
【发布时间】:2015-04-02 05:22:48
【问题描述】:
  • 顶部、侧面和底部的约束设置为 0
  • 仅在视图进入屏幕时发生

我认为图片比文字更能说明问题:

谢谢!!!

【问题讨论】:

  • 移除顶部约束,然后从 tableView 中按住 ctrl 并拖动到左侧窗格中的 TopLayoutGuide

标签: ios uitableview swift uinavigationcontroller


【解决方案1】:

对于大小检查器中的 tableview,y 值应该是 64。因为导航栏需要 44,状态栏需要 20。在此更新约束之后相应地。

【讨论】:

    【解决方案2】:

    通过在属性检查器中取消选中“自动调整边距”行中的某些内容并具有顶部约束 == 64 来修复它

    【讨论】:

      猜你喜欢
      • 2011-11-17
      • 1970-01-01
      • 2013-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-15
      • 2011-06-24
      相关资源
      最近更新 更多