【发布时间】: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