{"id":22663178,"url":"https://github.com/puti94/commonadapter","last_synced_at":"2025-03-29T09:14:01.435Z","repository":{"id":116083363,"uuid":"111658575","full_name":"puti94/CommonAdapter","owner":"puti94","description":"swift版本的万能适配器。供参考，，项目慎用","archived":false,"fork":false,"pushed_at":"2017-11-22T11:26:16.000Z","size":286,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T23:40:58.479Z","etag":null,"topics":["swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/puti94.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-22T08:46:12.000Z","updated_at":"2017-12-11T06:32:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fd98a27-75a1-41b6-8401-7bc32b49d154","html_url":"https://github.com/puti94/CommonAdapter","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/puti94%2FCommonAdapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puti94%2FCommonAdapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puti94%2FCommonAdapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puti94%2FCommonAdapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puti94","download_url":"https://codeload.github.com/puti94/CommonAdapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246162153,"owners_count":20733357,"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":["swift"],"created_at":"2024-12-09T12:17:35.660Z","updated_at":"2025-03-29T09:14:01.428Z","avatar_url":"https://github.com/puti94.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CommonAdapter\n   用惯了Android 封装的万能适配器, 非常不习惯IOS UITableView和UICollectionView又要设置数据源又要设置协议等各种复杂的操作，封装了个适配器。由于视图操作没有和数据源分离，严格来讲不能叫做Adapter,I don`t care\n\n- 使用:把项目中的CommonAdapter文件夹拖到项目中\n  \n   ```\n   简单用法\n   需要一个UITableViewCell类似于Android的ViewHolder\n   class TableViewCell: XTableViewCell {\n    @IBOutlet weak var label: UILabel!\n  }\n  //在viewDidAppear方法里面创建TableAdapter实例\n  TableAdapter\u003cString, TableViewCell\u003e(tableView,datas: data, convert: { cell, item, position in\n            print(item)\n            cell.label.text = item\n  })\n   具体用法看Demo\n   \n   ```\n## 效果图\n  ![效果图](https://github.com/puti94/CommonAdapter/blob/master/Simulator%20Screen%20Shot%20-%20iPhone%206%20-%202017-11-22%20at%2016.51.26.png)\n  ![效果图](https://github.com/puti94/CommonAdapter/blob/master/Simulator%20Screen%20Shot%20-%20iPhone%206%20-%202017-11-22%20at%2016.51.30.png)\n  ![效果图](https://github.com/puti94/CommonAdapter/blob/master/Simulator%20Screen%20Shot%20-%20iPhone%206%20-%202017-11-22%20at%2016.51.34.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputi94%2Fcommonadapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fputi94%2Fcommonadapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputi94%2Fcommonadapter/lists"}