iOS 11中的UIRefreshControl()存在故障效应。

11
每次我下拉刷新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

6
如果我们遇到了相同的问题,我通过将self.extendedLayoutIncludesOpaqueBars设置为YES来解决我的问题,不要问我为什么。 - hhanesand
1
@hhanesand 谢谢! - Arco
1个回答

21

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


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接