Created
January 2, 2018 10:34
-
-
Save iAmrSalman/00e4f849194d68061561368b17073af0 to your computer and use it in GitHub Desktop.
[Add Pull-to-Refresh] #swift #uitableview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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