每当我拉动刷新TableView时,UIRefreshControl似乎都是毛病.以下是我正在使用的代码.有任何想法吗?
在AppDelegate中:
UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().barTintColor = UIColor.red
UINavigationBar.appearance().tintColor = UIColor.white
Run Code Online (Sandbox Code Playgroud)
在UITableViewController中:
self.tableView.refreshControl = UIRefreshControl()
if #available(iOS 11.0, *) {
self.navigationController?.navigationBar.prefersLargeTitles = false
} else {
// Fallback on earlier versions
}
self.tableView.refreshControl = refreshCont
Run Code Online (Sandbox Code Playgroud) 是什么Void
在斯威夫特4是什么意思?如果我有一个函数fulfill
,如下:
func someFunc() -> Promise<Void> {
fulfill()
}
Run Code Online (Sandbox Code Playgroud)
显示错误,它仅在以下情况下有效:
fulfill(Void())
Run Code Online (Sandbox Code Playgroud)
注意.支持Swift 3:
fulfill()
Run Code Online (Sandbox Code Playgroud)
我正在使用Swift 4,但有人可以帮助解释为什么Void
在Swift 4中有一个构造函数吗?