{"id":23641238,"url":"https://github.com/jdisho/scrollablestackview","last_synced_at":"2025-08-31T17:32:37.630Z","repository":{"id":217089654,"uuid":"187392767","full_name":"jdisho/ScrollableStackView","owner":"jdisho","description":"🏄‍♀️ A UIStackView, which scrolls.","archived":false,"fork":false,"pushed_at":"2019-05-20T20:21:06.000Z","size":35,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-14T14:21:47.132Z","etag":null,"topics":["swift","uistackview","uistackview-scrollable"],"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/jdisho.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-18T18:33:28.000Z","updated_at":"2024-01-14T14:21:49.200Z","dependencies_parsed_at":"2024-01-14T14:21:49.149Z","dependency_job_id":"9485c040-ec97-4021-905b-7d4c131423e5","html_url":"https://github.com/jdisho/ScrollableStackView","commit_stats":null,"previous_names":["jdisho/scrollablestackview"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdisho%2FScrollableStackView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdisho%2FScrollableStackView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdisho%2FScrollableStackView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdisho%2FScrollableStackView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdisho","download_url":"https://codeload.github.com/jdisho/ScrollableStackView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231610640,"owners_count":18400207,"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":["swift","uistackview","uistackview-scrollable"],"created_at":"2024-12-28T09:58:05.060Z","updated_at":"2024-12-28T09:58:05.584Z","avatar_url":"https://github.com/jdisho.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScrollableStackView\nA simple class that leverages the power of Auto Layout to make `UIStackView` scrollable.\n\n- 📚 Acts as a normal `UIStackView`, but scrollable.\n- 📖 Subclassed from `UIScrollView` and uses `UIStackView` under the hood.\n- 👶 Easy-to-understand codebase (~ 100 lines of code) \n- 🎉 No external dependencies.\n\n## ⚙️ Installation \nDownload [ScrollableStackView](https://github.com/jdisho/ScrollableStackView/blob/master/ScrollableStackView/ScrollableStackView.swift) and manually import the file into your project.\n\n## 📚 Usage\n- Initializing\n```swift \n  let stackView = ScrollableStackView(frame: CGRect)\n  // or\n  let stackView = ScrollabelStackView(arrangedSubviews: [UIView]) // returns a new stack view object that manages the provided views\n```\n\n- Manage arranged subviews\n```swift \n var arrangedSubviews: [UIView] // list of views arranged by the stack view\n \n func addArrangedSubview(UIView) // adds *a view* to the end of the arrangedSubviews\n\n func addArrangedSubviews([UIView]) // adds *views* to the end of the arrangedSubviews\n \n func insertArrangedSubview(UIView, at: Int) // adds the provided view to the array of arranged subviews at the specified index\n \n func removeArrangedSubview(UIView) // removes the provided *view* from the stack’s array of arranged subviews\n \n func removeArrangedSubviews([UIView]) // removes the provided *views* from the stack’s array of arranged subviews\n \n```\n  \n - Configure the layout\n```swift \n  var axis: NSLayoutConstraint.Axis // default .horizontal\n   \n  var distribution: UIStackView.Distribution // default .fill\n  \n  var aligment: UIStackView.Distribution // default .fill\n  \n  var spacing: CGFloat // default 0.0\n  \n  var insets: UIEdgeInsets // default .zero\n```\n\n*I intent to keep this code base as simple as possible. Just as normal `UIStackView`, which scrolls. If you are interested in a scrollable `UIStackView` on steroids, check out [AloeStackView](https://github.com/airbnb/AloeStackView) by [Airbnb](https://github.com/airbnb).*\n\n## 🙏 Acknowledgements\n- Inspired from [Agnes Vasarhelyi](https://twitter.com/vasarhelyia)'s [Scrollable UIStackView](https://blog.alltheflow.com/scrollable-uistackview/)\n- Official `UIStackView` [documentation](https://developer.apple.com/documentation/uikit/uistackview?changes=latest_minor)\n- Created by [Joan Disho](twitter.com/_disho)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdisho%2Fscrollablestackview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdisho%2Fscrollablestackview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdisho%2Fscrollablestackview/lists"}