{"id":1310,"url":"https://github.com/efekanegeli/EEStackLayout","last_synced_at":"2025-08-02T04:30:51.717Z","repository":{"id":56909318,"uuid":"136320720","full_name":"efekanegeli/EEStackLayout","owner":"efekanegeli","description":"A structured vertical/horizontal stack layout","archived":false,"fork":false,"pushed_at":"2019-11-26T18:29:41.000Z","size":190,"stargazers_count":51,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-20T09:46:48.975Z","etag":null,"topics":["cocoapods","stack","stacklayout","swift","tags"],"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/efekanegeli.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-06-06T11:43:37.000Z","updated_at":"2024-12-31T12:17:29.000Z","dependencies_parsed_at":"2022-08-20T19:50:37.168Z","dependency_job_id":null,"html_url":"https://github.com/efekanegeli/EEStackLayout","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/efekanegeli/EEStackLayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekanegeli%2FEEStackLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekanegeli%2FEEStackLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekanegeli%2FEEStackLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekanegeli%2FEEStackLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efekanegeli","download_url":"https://codeload.github.com/efekanegeli/EEStackLayout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekanegeli%2FEEStackLayout/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334607,"owners_count":24233793,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["cocoapods","stack","stacklayout","swift","tags"],"created_at":"2024-01-05T20:15:43.511Z","updated_at":"2025-08-02T04:30:51.423Z","avatar_url":"https://github.com/efekanegeli.png","language":"Swift","funding_links":[],"categories":["Layout"],"sub_categories":["Other Hardware"],"readme":"# EEStackLayout\n\nA vertical stackview which takes subviews with different widths and adds them to it's rows with paddings, spacings etc.\n\n\n[![Twitter: @efekanegeli](https://img.shields.io/badge/contact-%40efekanegeli-blue.svg)](https://twitter.com/efekanegeli)\n[![CocoaPods](https://img.shields.io/badge/pod-v0.1.11-blue.svg)](https://github.com/efekanegeli/EEStackLayout)\n\n![Screenshot](https://github.com/efekanegeli/EEStackLayout/blob/master/example1.png)\n\n## Installation\n\n### Cocoapods\n\n```\npod 'EEStackLayout', '~\u003e 0.1'\npod install\n```\n\n### Swift Package Manager\n\n```\n.package(url: \"https://github.com/efekanegeli/EEStackLayout.git\", from: \"0.1.11\")\n```\n\n### Manual\n\n```\n1. Download .zip file\n2. Just drag and drop EEStackLayout.swift to your project\n```\n\n## Example Usage\n\n```swift\n// Subviews that will be added to stack layout\nvar viewArray = [UIView]()\n\n// Choose the orientation of EEStackLayout -\u003e vertical / horizontal [Just for demo purposes, change it if you want to see how horizontal EEStackLayout works]\nlet targetOrientationOfStackLayout = NSLayoutConstraint.Axis.vertical\n\nlet stackLayout: EEStackLayout\n\nif targetOrientationOfStackLayout == .vertical {\n    // Vertical EEStackLayout\n\n    // Views with same height for the vertical layout\n    for _ in 1...25 {\n        let view1 = UIView(frame: CGRect(x: 0, y: 0, width: 20, height: 42))\n        view1.backgroundColor = .green\n        let view2 = UIView(frame: CGRect(x: 0, y: 0, width: 30, height: 42))\n        view2.backgroundColor = .blue\n        let view3 = UIView(frame: CGRect(x: 0, y: 0, width: 40, height: 42))\n        view3.backgroundColor = .yellow\n        let view4 = UIView(frame: CGRect(x: 0, y: 0, width: 50, height: 42))\n        view4.backgroundColor = .black\n        viewArray.append(view1)\n        viewArray.append(view2)\n        viewArray.append(view3)\n        viewArray.append(view4)\n    }\n\n    // Vertical EEStackLayout setup\n    stackLayout = EEStackLayout(frame: CGRect(x: 0, y: 50, width: 300, height: 0),\n                                rowHeight: 20,\n                                minimumInteritemSpacing: 15,\n                                minimumItemSpacing: 10,\n                                insets: UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15),\n                                subviews: viewArray)\n\n} else {\n    // Horizontal EEStackLayout\n\n    // Views with same width for the horizontal layout\n    for _ in 1...25 {\n        let view1 = UIView(frame: CGRect(x: 0, y: 0, width: 30, height: 15))\n        view1.backgroundColor = .green\n        let view2 = UIView(frame: CGRect(x: 0, y: 0, width: 30, height: 25))\n        view2.backgroundColor = .blue\n        let view3 = UIView(frame: CGRect(x: 0, y: 0, width: 30, height: 35))\n        view3.backgroundColor = .yellow\n        let view4 = UIView(frame: CGRect(x: 0, y: 0, width: 30, height: 45))\n        view4.backgroundColor = .black\n        viewArray.append(view1)\n        viewArray.append(view2)\n        viewArray.append(view3)\n        viewArray.append(view4)\n    }\n\n    // Horizontal EEStackLayout setup\n    stackLayout = EEStackLayout(frame: CGRect(x: 0, y: 50, width: 0, height: 400),\n                                columnWidth: 20,\n                                minimumInteritemSpacing: 15,\n                                minimumItemSpacing: 10,\n                                insets: UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15),\n                                subviews: viewArray)\n}\n\nself.view.addSubview(stackLayout)\n```\n\n## Init Properties\n```\nminimumItemSpacing -\u003e Spacing between rows(vertical layout) or colums(horizontal layout)\nrowHeight -\u003e Row height of the main vertical stack view\nmaximumRowCount -\u003e Maximum row count of the vertical stack view, ignores the rest of the subviews if the actual row count exceeds the limit\ncolumnWidth -\u003e Column width of the main horizontal stack view\nmaximumColumnCount -\u003e Maximum column count of the horizontal stack view, ignores the rest of the subviews if the actual column count exceeds the limit\nminimumInteritemSpacing -\u003e Spacing between items in a row/column\ninsets -\u003e Layout margins of main vertical stack view\nsubviews -\u003e View array of elements to be added to the main stack view\n```\n\n## License\n\nMIT License, Copyright (c) 2018 Efekan Egeli, [@efekanegeli](https://twitter.com/efekanegeli)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefekanegeli%2FEEStackLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefekanegeli%2FEEStackLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefekanegeli%2FEEStackLayout/lists"}