A scrollable UIStackView.
- iOS 11.0+
- Xcode 10.2+
- Swift 5.0+
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate the library into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'Stacking', '2.0.0'
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
dependencies: [
.package(url: "https://github.com/berbschloe/Stacking.git", from: "2.0.0")
]
Import the library like you would any other.
// Add this to the top of your file
import Stacking
// StackingView is a subclass of UIView that containts a scroll view and a stack view.
// Common UIStackView properties and methods are also included in StackingView.
let stackingView = StackingView()
stackingView.axis = .vertical
// Add an arranged subview the same way you would for UIStackView
stackingView.addArrangedSubview(someView)
// You can even add multiple arranged subviews
stackingView.addArrangedSubviews([someView1, someView2])