{"id":20226164,"url":"https://github.com/augustrush/arcollectionviewdynamicsizecell","last_synced_at":"2025-04-10T17:06:25.008Z","repository":{"id":78617202,"uuid":"39116617","full_name":"AugustRush/ARCollectionViewDynamicSizeCell","owner":"AugustRush","description":"An simple extension for caculating autolayout UICollectionViewCell size. Use for swift.","archived":false,"fork":false,"pushed_at":"2015-07-15T14:32:43.000Z","size":2251,"stargazers_count":42,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T14:46:29.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AugustRush.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":"2015-07-15T04:43:21.000Z","updated_at":"2024-09-14T19:11:43.000Z","dependencies_parsed_at":"2023-02-24T12:00:26.629Z","dependency_job_id":null,"html_url":"https://github.com/AugustRush/ARCollectionViewDynamicSizeCell","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/AugustRush%2FARCollectionViewDynamicSizeCell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARCollectionViewDynamicSizeCell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARCollectionViewDynamicSizeCell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustRush%2FARCollectionViewDynamicSizeCell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AugustRush","download_url":"https://codeload.github.com/AugustRush/ARCollectionViewDynamicSizeCell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248260482,"owners_count":21074210,"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-11-14T07:16:37.729Z","updated_at":"2025-04-10T17:06:24.977Z","avatar_url":"https://github.com/AugustRush.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARCollectionViewDynamicSizeCell(swift)\nAn simple extension for caculating autolayout UICollectionViewCell size. Use for swift.\nObjective-c version: 'https://github.com/AugustRush/UICollectionView-ARDynamicHeightLayoutCell';\n\n## Demo GIF\n\n\u003cimg src=\"https://github.com/AugustRush/ARCollectionViewDynamicSizeCell/blob/master/gif1.gif\" width=\"320\"\u003e\n\n## Support\n* prototype cell in storyboard\n\n* -registerNib:forCellReuseIdentifier:\n\n* -registerClass:forCellReuseIdentifier:\n\n## Usage\n\n#### Dynamic Size\n```   \n  func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -\u003e CGSize {\n        return collectionView.ar_dynamicSize(\"FeedCell\", indexPath: indexPath, configuration: { (cell:AnyObject) -\u003e Void in\n            //let feedCell = cell as! FeedCell\n            //configuration of your cell\n        })\n    }\n\n```\n\n#### Fixed Width\n```   \n  func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -\u003e CGSize {\n        return collectionView.ar_dynamicSize(\"FeedCell\", indexPath: indexPath, configuration: { (cell:AnyObject) -\u003e Void in\n            //let feedCell = cell as! FeedCell\n            //configuration of your cell\n        },fixedWidth:320)//sample width\n    }\n```\n\n#### Fixed Height\n```   \n  func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -\u003e CGSize {\n        return collectionView.ar_dynamicSize(\"FeedCell\", indexPath: indexPath, configuration: { (cell:AnyObject) -\u003e Void in\n            //let feedCell = cell as! FeedCell\n            //configuration of your cell\n        },fixedHeight:200)//sample height\n    }\n\n```\n\n## TO DO\n\n* Cache for cell size\n* PreCache if needed\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustrush%2Farcollectionviewdynamicsizecell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustrush%2Farcollectionviewdynamicsizecell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustrush%2Farcollectionviewdynamicsizecell/lists"}