{"id":23815230,"url":"https://github.com/kharauzov/collapsetableview","last_synced_at":"2025-08-24T00:06:48.038Z","repository":{"id":56906238,"uuid":"190865505","full_name":"Kharauzov/CollapseTableView","owner":"Kharauzov","description":"Easily collapse or expand tableView's sections.","archived":false,"fork":false,"pushed_at":"2020-08-01T05:04:58.000Z","size":2453,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T00:01:30.621Z","etag":null,"topics":["collapse","expandabletableview","ios","swift","uitableview","uitableview-section","uitableviewcell"],"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/Kharauzov.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":"2019-06-08T08:46:00.000Z","updated_at":"2024-11-11T02:22:03.000Z","dependencies_parsed_at":"2022-08-20T19:20:21.678Z","dependency_job_id":null,"html_url":"https://github.com/Kharauzov/CollapseTableView","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/Kharauzov%2FCollapseTableView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kharauzov%2FCollapseTableView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kharauzov%2FCollapseTableView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kharauzov%2FCollapseTableView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kharauzov","download_url":"https://codeload.github.com/Kharauzov/CollapseTableView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232150097,"owners_count":18479580,"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":["collapse","expandabletableview","ios","swift","uitableview","uitableview-section","uitableviewcell"],"created_at":"2025-01-02T04:15:26.261Z","updated_at":"2025-01-02T04:15:26.940Z","avatar_url":"https://github.com/Kharauzov.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)\n[![License](https://img.shields.io/badge/license-mit-blue.svg)](https://doge.mit-license.org)\n\n## Overview\nThis is a Swift version of [STCollapseTableView](https://github.com/iSofTom/STCollapseTableView) that was written in Objective-C. \n\nCollapseTableView enables you to make expandable UITableView's sections with just a few lines of code.\n\n## Presentation\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"https://github.com/Kharauzov/CollapseTableView/blob/master/collapseTableViewDemo.gif\" width=\"250px\" height=\"472px\"/\u003e\n\u003c/p\u003e\n\n## Installation\n\n### CocoaPods\n\n```ruby\npod 'CollapseTableView'\n```\n\n### Manually\n\nJust copy **Source** folder to your Xcode project.\n\n## How To\n\nAfter adding the framework to your project, you need to import the module\n```swift\nimport CollapseTableView\n```\n\nThen you need to subclass your *UITableView* with *CollapseTableView* and set delegate/datasource as you always do. \nBy default, tableView sections are clickable and expandable. \n\nIf you want to disable clickability of sections, there is a special property for this:\n\n```swift\npublic var shouldHandleHeadersTap: Bool\n```\n\nSo after you implement standard tableView's dataSource/delegate methods for sections, you will be able to open or close the sections with your cells by clicking them.\n\nThere're extra tableView methods for work with sections:\n\n```swift\npublic func toggleSection(_ sectionIndex: Int, animated: Bool)\npublic func openSection(_ sectionIndex: Int, animated: Bool)\npublic func closeSection(_ sectionIndex: Int, animated: Bool)\npublic func isOpenSection(_ sectionIndex: Int) -\u003e Bool\n```\n\nThere's a closure to observe events for opening/closing sections:\n```swift\ntableView.didTapSectionHeaderView = { (sectionIndex, isOpen) in\n  \n}\n```\n\n## Features\n- [ ] Exlusive sections mode (Max 1 opened section)\n\n## Feedback\nIf you have any questions or suggestions, feel free to open issue just at this project.\n\n## License\nCollapseTableView and all its classes are available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkharauzov%2Fcollapsetableview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkharauzov%2Fcollapsetableview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkharauzov%2Fcollapsetableview/lists"}