{"id":13732505,"url":"https://github.com/ChernyshenkoTaras/SquareFlowLayout","last_synced_at":"2025-05-08T07:30:48.681Z","repository":{"id":41519390,"uuid":"157064221","full_name":"ChernyshenkoTaras/SquareFlowLayout","owner":"ChernyshenkoTaras","description":" 🌄 UICollectionViewLayout subclass inspired by Instagram Discover page style layout.","archived":false,"fork":false,"pushed_at":"2020-05-20T06:02:09.000Z","size":1339,"stargazers_count":159,"open_issues_count":2,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-25T18:11:09.246Z","etag":null,"topics":["collectionview","collectionviewlayout","swift","swift-library","uicollectionview","uicollectionviewflowlayout"],"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/ChernyshenkoTaras.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":"2018-11-11T09:18:46.000Z","updated_at":"2025-02-22T07:33:21.000Z","dependencies_parsed_at":"2022-08-26T10:10:30.893Z","dependency_job_id":null,"html_url":"https://github.com/ChernyshenkoTaras/SquareFlowLayout","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChernyshenkoTaras%2FSquareFlowLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChernyshenkoTaras%2FSquareFlowLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChernyshenkoTaras%2FSquareFlowLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChernyshenkoTaras%2FSquareFlowLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChernyshenkoTaras","download_url":"https://codeload.github.com/ChernyshenkoTaras/SquareFlowLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253020691,"owners_count":21841622,"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":["collectionview","collectionviewlayout","swift","swift-library","uicollectionview","uicollectionviewflowlayout"],"created_at":"2024-08-03T02:02:00.002Z","updated_at":"2025-05-08T07:30:48.353Z","avatar_url":"https://github.com/ChernyshenkoTaras.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# SquareFlowLayout \n![Swift 4.2.x](https://img.shields.io/badge/Swift-4.2.x-orange.svg)\n![License](https://img.shields.io/badge/License-MIT-blue.svg)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\u003cp\u003e\u003cimg src=\"https://github.com/ChernyshenkoTaras/SquareFlowLayout/blob/master/SquareFlowLayout/Screenshots/SquareFlowLayout-4.png\" alt=\"Smiley face\" align=\"right\"\u003e \u003c/p\u003e\n\nMakes your `UICollectionView` to looks like Instagram explore has never been so easy before. `SquareFlowLayout` provide dynamic layout generation by defining which IndexPath should be expanded.\n\n## Installation\n\n#### CocoaPods\n\n`pod 'SquareFlowLayout'`\n\n#### Manually\n\n1. Download and drop ```Classes``` folder into your project.\n2. Congratulations!\n\n## Usage\n\n1. Set `SquareFlowLayout` to your UICollectionView and set it `flowDelegate`\n\n```\n    let flowLayout = SquareFlowLayout()\n    flowLayout.flowDelegate = self\n    self.collectionView.collectionViewLayout = flowLayout\n```\n\n2. Make your class conform to `SquareFlowLayoutDelegate`\n3. Use delegate method to decide which cell should be pinned\n```\nextension ViewController: SquareFlowLayoutDelegate {\n    func shouldExpandItem(at indexPath: IndexPath) -\u003e Bool {\n        return self.layoutValues[indexPath.row] == .expanded\n    }\n}\n```\n4. Look into example project for more info\n\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://imgflip.com/gif/2mxpdi\"\u003e\u003cimg src=\"https://i.imgflip.com/2mxpdi.gif\" title=\"made at imgflip.com\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Contributing to this project\n\nIf you like this tool, show your support by tell me how do u use it.\n\n## License\n\nThis code is distributed under the terms and conditions of the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChernyshenkoTaras%2FSquareFlowLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChernyshenkoTaras%2FSquareFlowLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChernyshenkoTaras%2FSquareFlowLayout/lists"}