Skip to content

Instantly share code, notes, and snippets.

@iAmrSalman
Created January 2, 2018 10:34
Show Gist options
  • Save iAmrSalman/00e4f849194d68061561368b17073af0 to your computer and use it in GitHub Desktop.
Save iAmrSalman/00e4f849194d68061561368b17073af0 to your computer and use it in GitHub Desktop.
[Add Pull-to-Refresh] #swift #uitableview
// Configure Refresh Control
refreshControl.addTarget(self, action: #selector(refresh(_:)), for: .valueChanged)
refreshControl.tintColor = UIColor.Kotobi.red
if #available(iOS 10.0, *) {
self.tableView.refreshControl = refreshControl
} else {
self.tableView.addSubview(refreshControl)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment