Skip to content

Instantly share code, notes, and snippets.

@Th3nion
Last active October 6, 2017 12:48
Show Gist options
  • Save Th3nion/c7a182bf20d0d58c6a0febed78d8f6ad to your computer and use it in GitHub Desktop.
Save Th3nion/c7a182bf20d0d58c6a0febed78d8f6ad to your computer and use it in GitHub Desktop.
DispatchQueue.main.async {
}
################################################################################
DispatchQueue.global().async {
}
################################################################################
//MARK: - UITableViewDataSource
extension <#class#> : UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return <#result#>
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: <#T##String#>)
return cell
}
}
################################################################################
//MARK:- UITableViewDelegate
extension <#class#> : UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
<#code#>
}
}
################################################################################
do {
try CoreStore.perform (synchronous: { (transaction) -> Void in
<#transaction#>
}, waitForAllObservers: false)
} catch {
<#error#>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment