【问题标题】:Adjust scroll view insets not working properly on iOS 10 and bellow调整滚动视图插图在 iOS 10 和以下版本中无法正常工作
【发布时间】:2017-11-15 20:00:27
【问题描述】:

我检查了情节提要中的 Adjust Scroll View Insets 属性并将 tableview 固定以适合其父视图。

当我在低于 10 的 iOS 版本上运行应用程序时,tableViewnavigation bartab bar 覆盖。但它在 iOS 11 上完美运行。

我错过了什么?

附:我正在使用 xcode 9

【问题讨论】:

    标签: ios xcode


    【解决方案1】:

    我通过添加以下代码解决了这个问题:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多