{"id":2716,"url":"https://github.com/dekatotoro/PullToRefreshSwift","last_synced_at":"2025-08-06T16:31:47.537Z","repository":{"id":24462081,"uuid":"27865234","full_name":"dekatotoro/PullToRefreshSwift","owner":"dekatotoro","description":"iOS Simple Cool PullToRefresh Library. It is written in pure swift.","archived":false,"fork":false,"pushed_at":"2019-05-11T11:01:02.000Z","size":842,"stargazers_count":537,"open_issues_count":24,"forks_count":101,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-12-06T01:31:58.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dekatotoro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-11T10:08:57.000Z","updated_at":"2024-08-13T07:36:19.000Z","dependencies_parsed_at":"2022-08-22T08:20:39.574Z","dependency_job_id":null,"html_url":"https://github.com/dekatotoro/PullToRefreshSwift","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekatotoro%2FPullToRefreshSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekatotoro%2FPullToRefreshSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekatotoro%2FPullToRefreshSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekatotoro%2FPullToRefreshSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dekatotoro","download_url":"https://codeload.github.com/dekatotoro/PullToRefreshSwift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923731,"owners_count":17992569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:20.960Z","updated_at":"2024-12-09T16:31:11.953Z","avatar_url":"https://github.com/dekatotoro.png","language":"Swift","funding_links":[],"categories":["UI","Libs","UI [🔝](#readme)"],"sub_categories":["Pull to Refresh","UI","Layout","Other free courses"],"readme":"PullToRefreshSwift\n==================\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\n)](http://mit-license.org)\n[![Issues](https://img.shields.io/github/issues/dekatotoro/PullToRefreshSwift.svg?style=flat\n)](https://github.com/dekatotoro/PullToRefreshSwift/issues?state=open)\n\n\n\niOS Simple PullToRefresh Library.\n\n![sample](Screenshots/PullToRefreshSwift.gif)\n\n##Installation\n\n####CocoaPods\n```\npod 'PullToRefreshSwift'\n```\n\n####Manually\nAdd the following files to your project. \n`pulltorefresharrow.png`\n`PullToRefreshView.swift`\n`PullToRefreshConst.swift`\n`UIScrollViewExtension.swift`\n\n\n##Usage\n\n###Setup\n\nIn your UIViewController Including UITableView, UICollectionView, UIScrollView:\n```swift\n  override func viewDidLoad() {\n        self.tableView.addPullToRefresh({ [weak self] in\n            // refresh code\n            \n            self?.tableView.reloadData()\n            self?.tableView.stopPullToRefresh()\n        })\n  }\n```\n\nYou can use PullToRefreshOption class at addPullToRefresh func option parameter:\n```swift\n  override func viewDidLoad() {\n       let options = PullToRefreshOption()\n        options.backgroundColor = UIColor.blueColor()\n        options.indicatorColor = UIColor.whiteColor()\n        \n        self.tableView.addPullToRefresh(options: options, { [weak self] in\n            // some code\n            \n            self?.tableView.reloadData()\n            self?.tableView.stopPullToRefresh()\n        })\n        \n  }\n```\n  \nIf you want to fixed pulltoRefreshView, please implement scrollViewDidScroll.\n```swift\n  func scrollViewDidScroll(scrollView: UIScrollView) {\n    self.tableView.fixedPullToRefreshViewForDidScroll()\n  }  \n```\n  \nIf you want to use the custom const, please change the PullToRefreshConst class.\n```swift\nstruct PullToRefreshConst {\n    static let tag = 810\n    static let alpha = true\n    static let height: CGFloat = 80\n    static let imageName: String = \"pulltorefresharrow.png\"\n    static let animationDuration: Double = 0.4\n    static let fixedTop = true // PullToRefreshView fixed Top\n}\n```\nIf you want to use the custom option, please change the PullToRefreshOption class.\nYou can use this class at addPullToRefresh func option parameter.\n```swift\nclass PullToRefreshOption {\n    var backgroundColor = UIColor.clearColor()\n    var indicatorColor = UIColor.grayColor()\n    var autoStopTime: Double = 0.7 // 0 is not auto stop\n    var fixedSectionHeader = false  // Update the content inset for fixed section headers\n}\n```\n\n## Requirements\nRequires Swift3.0 and iOS 8.0 and ARC.  \nIf you are developing in the Swift1.1 ~ 2.3, please use branch of Swift1.1 ~ Swift2.3.  \n\n## Features\n- Highly customizable\n- Complete example\n- Refactoring\n\n## Contributing\n\nForks, patches and other feedback are welcome.\n\n## Creator\n\n[Yuji Hato](https://github.com/dekatotoro) \n[Blog](http://buzzmemo.blogspot.jp/)\n\n## License\n\nPullToRefreshSwift is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekatotoro%2FPullToRefreshSwift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdekatotoro%2FPullToRefreshSwift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekatotoro%2FPullToRefreshSwift/lists"}