{"id":20805396,"url":"https://github.com/kornerr/ios-collapse-expand","last_synced_at":"2026-06-16T20:32:20.073Z","repository":{"id":71547548,"uuid":"141424732","full_name":"kornerr/ios-collapse-expand","owner":"kornerr","description":"Sample iOS application to implement collapse/expand animation","archived":false,"fork":false,"pushed_at":"2018-07-20T14:51:39.000Z","size":712,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T13:23:29.259Z","etag":null,"topics":["ios","ios-application","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/kornerr.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":"2018-07-18T11:19:16.000Z","updated_at":"2018-07-20T14:51:41.000Z","dependencies_parsed_at":"2023-08-01T03:31:30.878Z","dependency_job_id":null,"html_url":"https://github.com/kornerr/ios-collapse-expand","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kornerr/ios-collapse-expand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornerr%2Fios-collapse-expand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornerr%2Fios-collapse-expand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornerr%2Fios-collapse-expand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornerr%2Fios-collapse-expand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kornerr","download_url":"https://codeload.github.com/kornerr/ios-collapse-expand/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornerr%2Fios-collapse-expand/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34423214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ios","ios-application","swift"],"created_at":"2024-11-17T19:14:35.092Z","updated_at":"2026-06-16T20:32:20.042Z","avatar_url":"https://github.com/kornerr.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Overview\n\nThis is a sample iOS application to implement collapse / expansion animation.\n\n# Preview\n\nThis is what the app looks like:\n\n![Preview][preview]\n\n# Collapse / expansion animation\n\nThe are several entities at play:\n\n* `LayoutReportingView`\n    * a simple `UIView` derivative to report when `UIView` instance gets `layoutSubviews()` call\n* `MainVC.storyboard`\n    * provides `DetailsView`, which is `LayoutReportingView`\n    * constraints `DetailsView` to the collapsed state with a fixed height constraint\n        * height: 100\n        * priority: 750\n    * expands `DetailsView` to the top of the superview\n        * priority: 1000\n* `CollapseExpansionController`\n    * accepts height range available for expansion\n    * installs `UIPanGestureRecognizer` into tracked view\n    * reports new `height` values each pan gesture\n    * reports final `height` value once pan gesture is finished\n* `AppDelegate`\n    * creates `CollapseExpansionController`\n        * only does so once height range of `DetailsView` becomes available\n        * provides `DetailsView` as tracked view\n    * sets `DetailsView` height to the `height` while panning (`heightChanged` callback)\n    * animates `DetailsView` height to the `height` after panning (`completeHeightChange` callback)\n\n**Note**: [XcodeGen][xcodegen] was used to generate Xcode project\n\n[preview]: preview.gif\n[xcodegen]: https://github.com/yonaskolb/XcodeGen\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornerr%2Fios-collapse-expand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkornerr%2Fios-collapse-expand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornerr%2Fios-collapse-expand/lists"}