{"id":25937026,"url":"https://github.com/ashen-23/sjlinerefresh","last_synced_at":"2025-10-07T19:13:04.788Z","repository":{"id":62453807,"uuid":"91790345","full_name":"ashen-23/SJLineRefresh","owner":"ashen-23","description":"pull-to-refresh by line path","archived":false,"fork":false,"pushed_at":"2019-11-25T08:03:48.000Z","size":3937,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T22:03:48.812Z","etag":null,"topics":["customizable","pull-to-refresh"],"latest_commit_sha":null,"homepage":null,"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/ashen-23.png","metadata":{"files":{"readme":"README-chiness.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":"2017-05-19T09:33:30.000Z","updated_at":"2022-03-18T17:32:02.000Z","dependencies_parsed_at":"2022-11-02T00:00:49.937Z","dependency_job_id":null,"html_url":"https://github.com/ashen-23/SJLineRefresh","commit_stats":null,"previous_names":["515783034/sjlinerefresh"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashen-23%2FSJLineRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashen-23%2FSJLineRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashen-23%2FSJLineRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashen-23%2FSJLineRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashen-23","download_url":"https://codeload.github.com/ashen-23/SJLineRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241773226,"owners_count":20018065,"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":["customizable","pull-to-refresh"],"created_at":"2025-03-04T02:55:17.074Z","updated_at":"2025-10-07T19:12:59.731Z","avatar_url":"https://github.com/ashen-23.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SJLineRefresh\n\n![](https://img.shields.io/cocoapods/p/SJLineRefresh.svg?style=flat) ![](https://img.shields.io/badge/language-swift5-orange.svg)\n\nSJLineRefresh 是用 swift5 写的高度自定义的线性下拉刷新控件。\n\n- **介绍**\n***\n高度自定义的线性下拉刷新控件\n\n- **使用**\n***\n ` 1.基础用法`\n```swift\nlet aPath = Bundle.main.path(forResource: \"HHMedic\", ofType: \"plist\")!\nlet aConfig = SJRefreshConfig(plist: aPath)\ntableView.sj_header = SJRefreshView(config: aConfig) { [weak self] in\n  // do your refresh\n}\n```\n` 2.全局使用`\n```swift\nlet aPath = getCurrentBundle().path(forResource: \"HHMedic\", ofType: \"plist\") ?? \"\"\nSJRefreshManager.default.defaultConfig = SJRefreshConfig(plist: aPath) // 设置全局config\ntableView.sj_header = SJRefreshView.default { [weak self] in\n\t// 刷新回调\n\t// 结束刷新\n\tself?.tableView.endRefresh()\n}\n// plist只加载一次\n```\n` 3.手动刷新/结束`\n```swift\ntableView.beginRefresh() // 手动开始刷新\ntableView.endRefresh()   // 结束刷新\n```\n\n` 4.动画参数`\n```swift\nstartRatio // 开始动画的起始点与整个高度的比例\nendRatio   // 结束动画的起始点与整个高度的比例\nstepLength // 每个line\"闪烁\"所用时间\nstepDuration // \"闪烁\"的动画时长\nstyle  // 动画类型\n\tnormal // 默认\n\tstay   // \"闪烁\"完成后保持闪烁状态\n\tstep   // 下拉时,一个line绘制完成后才继续下一个绘制\n\treverse //从最后一个line往前\"闪烁\n```\n![debug](https://github.com/515783034/SJLIineRefresh/blob/master/imgs/debug.gif)\n\n- **创建形状**\n***\n\n```description\n- 使用PaintCode画线, 在plist中写入对应的所有线条的起始点和终点(数量要保持一致)\n- 下拉刷新视图的宽高等于起点和终点的最大距离, 居中对齐\n```\n\n- **安装**\n***\n**CocoaPods**\n\n```ruby\npod 'SJLineRefresh', '~\u003e 1.1.1'\n```\n**Carthage**\n```\ngithub \"515783034/SJLIineRefresh\" ~\u003e 1.1.1\n```\n\n- **参考**\n***\n[MJRefresh](https://github.com/CoderMJLee/MJRefresh)\n\n[CBStoreHouseRefreshControl](https://github.com/coolbeet/CBStoreHouseRefreshControl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashen-23%2Fsjlinerefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashen-23%2Fsjlinerefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashen-23%2Fsjlinerefresh/lists"}