【问题标题】:UIRefreshControl() in iOS 11 Glitchy effectiOS 11 Glitchy 效果中的 UIRefreshControl()
【发布时间】:2018-03-13 13:47:03
【问题描述】:

每次我刷新 TableView 时,UIRefreshControl 都会出现故障。下面是我正在使用的代码。有什么想法吗?

在 AppDelegate 中:

UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().barTintColor = UIColor.red
UINavigationBar.appearance().tintColor = UIColor.white

在 UITableViewController 中:

self.tableView.refreshControl = UIRefreshControl()

if #available(iOS 11.0, *) {
  self.navigationController?.navigationBar.prefersLargeTitles = false
} else {
  // Fallback on earlier versions
}

self.tableView.refreshControl = refreshCont

【问题讨论】:

  • 如果我们有同样的问题,我通过设置 self.extendedLayoutIncludesOpaqueBars = YES 解决了我的问题,不要问我为什么
  • @hhanes,谢谢!

标签: swift ios11 xcode9 uirefreshcontrol


【解决方案1】:

对我来说self.extendedLayoutIncludesOpaqueBars = YES 解决了这个问题。

【讨论】:

    猜你喜欢
    • 2018-03-29
    • 2018-05-02
    • 2018-04-23
    • 2012-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-30
    相关资源
    最近更新 更多