【问题标题】:table collection view not sticking to the bottom layout xcode on ipad表格集合视图不坚持 ipad 上的底部布局 xcode
【发布时间】:2018-07-02 15:52:33
【问题描述】:

大家好,所以我有一个表格视图,它不会粘在 ipad 的底部,但它会在 iphone 上。这是一个简单的表格视图,它的约束基本上是 0 底部,0 前导,0 尾随我将在此处附加图像。

the problem

the constraints

【问题讨论】:

    标签: ios xcode autolayout constraints ios-autolayout


    【解决方案1】:

    这种奇怪的行为来自scrollview insets,让我们在你的视图控制器中试试这个:

    if #available(iOS 11.0, *) {
        tableView.contentInsetAdjustmentBehavior = .never
    } else {
        automaticallyAdjustsScrollViewInsets = false
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-12-31
      • 1970-01-01
      • 2015-06-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-07
      相关资源
      最近更新 更多