{"id":17996797,"url":"https://github.com/cosmo/feedcollectionviewlayout","last_synced_at":"2025-04-04T06:14:29.513Z","repository":{"id":146386843,"uuid":"76229319","full_name":"Cosmo/FeedCollectionViewLayout","owner":"Cosmo","description":"[WIP] 📱📐 Customizable UICollectionLayout for single and multi-column feeds.","archived":false,"fork":false,"pushed_at":"2016-12-12T07:40:08.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T05:47:01.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Cosmo.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":"2016-12-12T06:41:58.000Z","updated_at":"2022-02-12T17:31:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"3594398b-a862-450a-a246-3ad02552ed42","html_url":"https://github.com/Cosmo/FeedCollectionViewLayout","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/Cosmo%2FFeedCollectionViewLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmo%2FFeedCollectionViewLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmo%2FFeedCollectionViewLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmo%2FFeedCollectionViewLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cosmo","download_url":"https://codeload.github.com/Cosmo/FeedCollectionViewLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128753,"owners_count":20888235,"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-29T21:15:52.917Z","updated_at":"2025-04-04T06:14:29.494Z","avatar_url":"https://github.com/Cosmo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [WIP] FeedCollectionViewLayout\n\nA Customizable UICollectionLayout for single and multi-column feeds.\n\n## Usage\n\n### Basic Setup\n\n```swift\nlet collectionViewLayout = FeedCollectionViewLayout()\n// setup optional properties here\nreturn UICollectionView(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)\n```\n\n### Enable Self-Sizing Cells (optional)\n\n```swift\ncollectionViewLayout.estimatedItemHeight = 20.0\ncollectionViewLayout.itemHeight = FeedCollectionViewLayoutAutomaticHeight\n```\n\n### Properties\n\n```swift\ncollectionViewLayout.itemHeight // CGFloat\ncollectionViewLayout.estimatedItemHeight // CGFloat\n\ncollectionViewLayout.sectionInsets // UIEdgeInsets\ncollectionViewLayout.numberOfColumns // Int\ncollectionViewLayout.lineSpacing // CGFloat\ncollectionViewLayout.interItemSpacing // CGFloat\n```\n\n### Delegate (optional)\n\nSubclass `FeedCollectionViewLayoutDelegate` and implement the protocol:\n\n```swift\nfunc insetsForSection(_ section: Int) -\u003e UIEdgeInsets\nfunc lineSpacingForSection(_ section: Int) -\u003e CGFloat\nfunc interItemSpacingForSection(_ section: Int) -\u003e CGFloat\nfunc heightForItem(at indexPath: IndexPath) -\u003e CGFloat\nfunc numberOfColumns(inSection section: Int) -\u003e Int\n```\n\nand create a reference:\n\n```swift\ncollectionViewLayout.delegate = MyFeedDelegate()\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo%2Ffeedcollectionviewlayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmo%2Ffeedcollectionviewlayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmo%2Ffeedcollectionviewlayout/lists"}