GithubHelp home page GithubHelp logo

pilas's Introduction

Pilas

Travis build status Cocoapods Compatible Platform Docs

Description

A scrollable StackView for quick UI creation.

Pilas.gif

Requirements

  • iOS 9.0+

Installation

CocoaPods

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

pod 'Pilas'

Usage

Initialization

A PilasScrollView can be initialized through a storyboard or programmatically.

@IBOutlet private weak var stackViewScrollView: PilasScrollView!
var pilasScrollView = PilasScrollView()

The axis of the StackView can be changed to change stack and scroll direction. Default is set to vertical.

horizontalScrollView.axis = .vertical

Inserting Views

Views can be inserted into the PilasScrollView through the insertView method. The width and height can also be set to add a width or height constraint depending on the stackView's axis. If the axis is vertical we recommend setting a height constraint and a width constraint for a horizontal axis.

pilasScrollView.axis = .vertical
pilasScrollView.insertView(view: UIView, height: 50)
pilasScrollView.axis = .horizontal
pilasScrollView.insertView(view: UIView, width: 50)

Divider views can also be inserted into the PilasScrollView to allow custom spacing between views. Height and width parameters are available and should be used similarly to inserting views as described above.

pilasScrollView.axis = .vertical
pilasScrollView.insertDividerView(height: 10, backgroundColor: UIColor.black)

Keyboard Notifications

Keyboard show and hide notifications are enabled by default to increase or decrease the content inset. The default bottom inset can be customized if a project needs a default bottom inset that is not 0.

pilasScrollView.enableKeyboardNotifications = true
pilasScrollView.defaultBottomInset = 0

Contributing to Pilas

To report a bug or enhancement request, feel free to file an issue under the respective heading.

If you wish to contribute to the project, fork this repo and submit a pull request. Code contributions should follow the standards specified in the Prolific Swift Style Guide.

License

prolific

Copyright (c) 2017 Prolific Interactive

Pilas is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the LICENSE file.

pilas's People

Contributors

jgsamudio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.