{"id":16331363,"url":"https://github.com/midoks/mdtableviewhafpullrefresh","last_synced_at":"2025-05-15T16:13:49.237Z","repository":{"id":25470993,"uuid":"28901486","full_name":"midoks/MDTableViewHAFPullRefresh","owner":"midoks","description":"tableview the drop-down","archived":false,"fork":false,"pushed_at":"2015-01-07T07:19:06.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T12:23:18.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midoks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-07T06:21:01.000Z","updated_at":"2015-01-07T07:19:06.000Z","dependencies_parsed_at":"2022-08-24T02:40:44.305Z","dependency_job_id":null,"html_url":"https://github.com/midoks/MDTableViewHAFPullRefresh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2FMDTableViewHAFPullRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2FMDTableViewHAFPullRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2FMDTableViewHAFPullRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2FMDTableViewHAFPullRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midoks","download_url":"https://codeload.github.com/midoks/MDTableViewHAFPullRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374534,"owners_count":22060612,"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-10-10T23:26:46.669Z","updated_at":"2025-05-15T16:13:49.216Z","avatar_url":"https://github.com/midoks.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"MDTableViewHAFPullRefresh\n=========================\n\n说明\n\n这是一个iOS的tableview上下拉功能实现。这是很基本的实现,我同样在网上找个很久,并且一一测试,总感觉用起来不\n舒服。于是,我根据[EGOTableViewPullRefresh](https://github.com/enormego/EGOTableViewPullRefresh)\n这个开源的下拉的功能的思路.再根据自己的测试,实现了tableview的上下拉功能。\n\t感谢开源。\n\n### 使用步骤\n\n- 引入\n````\n\t#import \"MDTableViewHAFPullRefresh.h\"\n````\n- 申明变量\n````\n\tMDTableViewHAFPullRefresh *_refreshHAFView;\n````\n- 初始化\n````\n\tif (!_refreshHAFView) {\n        MDTableViewHAFPullRefresh *view = [[MDTableViewHAFPullRefresh alloc] initWithFrame:CGRectMake(0.0f, 0.0f-self.tableView.bounds.size.height, self.tableView.bounds.size.width, self.tableView.bounds.size.height)];\n        view.delegate = self;\n        view.view = self.view;\n        _refreshHAFView = view;\n        [self.tableView addSubview:view];\n    }\n````\n- 实现代理方法\n````\n\t-(void)scrollViewDidScroll:(UIScrollView *)scrollView\n\t{\n\t    [_refreshHAFView mdRefreshScrollViewDidScroll:scrollView];\n\t}\n\n\t-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate\n\t{\n\t    [_refreshHAFView mdRefreshScrollViewDidEndDragging:scrollView];\n\t}\n````\n- 刷新方法Demo\n````\t\n\t#warning 顶部刷新\n\t- (void)mdRefreshTableHeadTriggerRefresh:(MDTableViewHAFPullRefresh *)view\n\t{\n\t    NSLog(@\"head\");\n\t    [self performSelector:@selector(mdHeadOK) withObject:nil afterDelay:3.0f];\n\t}\n\n\t-(void)mdHeadOK\n\t{\n\t    [_refreshHAFView mdHeadOK];\n\t}\n\n\t#warning 底部刷新\n\t-(void)mdRefreshTableFootTriggerRefresh:(MDTableViewHAFPullRefresh *)view\n\t{\n\t    NSLog(@\"foot\");\n\t    [self performSelector:@selector(mdFootOK) withObject:nil afterDelay:3.0f];\n\t}\n\n\t-(void)mdFootOK\n\t{\n\t    [_refreshHAFView mdFootOK];\n\t}\n````","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoks%2Fmdtableviewhafpullrefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidoks%2Fmdtableviewhafpullrefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoks%2Fmdtableviewhafpullrefresh/lists"}