{"id":20067594,"url":"https://github.com/asaday/baserefreshcontrol","last_synced_at":"2026-06-13T09:31:38.408Z","repository":{"id":56903519,"uuid":"61949520","full_name":"asaday/BaseRefreshControl","owner":"asaday","description":"Base kit to make custom UIRefreshControl","archived":false,"fork":false,"pushed_at":"2016-10-12T13:59:18.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T14:16:47.870Z","etag":null,"topics":[],"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/asaday.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":"2016-06-25T15:32:55.000Z","updated_at":"2016-06-26T20:59:40.000Z","dependencies_parsed_at":"2022-08-21T02:50:10.465Z","dependency_job_id":null,"html_url":"https://github.com/asaday/BaseRefreshControl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaday%2FBaseRefreshControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaday%2FBaseRefreshControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaday%2FBaseRefreshControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaday%2FBaseRefreshControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asaday","download_url":"https://codeload.github.com/asaday/BaseRefreshControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241494180,"owners_count":19971871,"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-11-13T14:02:29.401Z","updated_at":"2026-06-13T09:31:33.382Z","avatar_url":"https://github.com/asaday.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# BaseRefreshControl\n\nBase kit to make custom UIRefreshControl.\n\nyou can make original refresh animation.\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 7+\n\n## Integration\n\n### Cocoapods\n\nyou can use Cocoapods install BaseRefreshControl by adding it to your Podfile\n\n```\nuse_frameworks!\n...\npod 'BaseRefreshControl'\n...\n```\n\n### Carthage\n\nyou can use Carthage install BaseRefreshControl by adding it to your Cartfile\n\n```\ngithub \"asaday/BaseRefreshControl\"\n```\n\n## Usage\n\n### make\n\nto use, inherit BaseRefreshControl,and write some code.\n\nexample\n\n```\nimport UIKit\nimport BaseRefreshControl\n\nclass MyRefreshControl: BaseRefreshControl {\n\n\tlet lbl = UILabel(frame: .zero)\n\n\t// initialize, add any control\n\toverride func setup() {\n\t\tlbl.frame = bounds\n\t\tlbl.textAlignment = .Center\n\t\taddSubview(lbl)\n\t}\n\n\toverride func layout() {\n\t\tlbl.frame = bounds\n\t}\n\n\t// in dragging\n\toverride func progressRefresh(progress: CGFloat) {\n\t\tlbl.text = \"progress \\(Int(progress * 100))%\"\n\t}\n\n\t// start refreshing\n\toverride func willStartRefresh() {\n\t\tlbl.text = \"refreshing\"\n\t}\n\n\t// end refreshing\n\toverride func willEndRefresh() {\n\t\tlbl.text = \"done\"\n\t}\n}\n```\n\nplease see sample/\n\ninherit functions \n\n```\npublic func setup()\npublic func layout()\npublic func progressRefresh(progress: CGFloat)\npublic func willStartRefresh()\npublic func willEndRefresh()\n```\n\n### use\n\nto use, nearly same UIRefreshControl like this\n\n```\nlet refresh = MyRefreshControl()\nrefresh.addTarget(self, action: #selector(doRefresh(_:)), forControlEvents: .ValueChanged)\ntable.addSubview(refresh)\n```\n\n\nuse functions\n\n```\nfunc endRefreshing()\nfunc beginRefreshing()\nvar refreshing: Bool { get }\n```\n\ntips, convenience init\n\n```\ntable.addSubview(MyRefreshControl(target: self, action: #selector(doRefresh(_:))))\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaday%2Fbaserefreshcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasaday%2Fbaserefreshcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaday%2Fbaserefreshcontrol/lists"}