SkillAgentSearch skills...

ScrollStack

A vertical & horizontal scrollable stack layout that supports weighted sizing of elements.

Install / Use

/learn @cmc5788/ScrollStack
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ScrollStack

Build Status Version License Platform

ScrollStack combines UIScrollView and some concepts from UIStackView into a single view called ScrollStackView. In addition, it adds the concept of weighted sizes for children. Currently the best way to get up and running with ScrollStackView is to check out the Example app's ViewController.swift file. Adding a child to a ScrollStackView is as simple as:

let scrollStack = ScrollStackView()
// ...
scrollStack.pushItem(.init(UIView()))
{ (item, v: UIView) in
    v.backgroundColor = .random()
    return item
        .fixedSize(50)
        .leading(16)
        .trailing(16)
}

Note that this library currently includes no conveniences for usage in Interface Builder, and is optimized for programmatic layouts.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

The Example app uses SnapKit for convenience in Autolayout, but ScrollStack itself brings in no external dependencies.

Installation

ScrollStack is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ScrollStack'

Author

cmc5788, cmc5788@gmail.com

License

ScrollStack is available under the MIT license. See the LICENSE file for more info.

View on GitHub
GitHub Stars6
CategoryCustomer
Updated7y ago
Forks0

Languages

Swift

Security Score

70/100

Audited on Mar 11, 2019

No findings