Stacking 2.0.0

Stacking 2.0.0

Maintained by Brandon Erbschloe.



Stacking 2.0.0

  • By
  • Brandon Erbschloe

Stacking

Swift CocoaPods

A scrollable UIStackView.

Requirements

  • iOS 11.0+
  • Xcode 10.2+
  • Swift 5.0+

CocoaPods

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'

Swift Package Manager

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")
]

Usage

Import the library like you would any other.

Importing

// Add this to the top of your file
import Stacking

Example

// 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])