PinCushion

An Autolayout extension wrapping NSLayoutConstraint for easier constraint logic.


Keywords
autolayout-framework, swift, uiview-extension
License
MIT
Install
pod try PinCushion

Documentation

PinCushion

Version License Platform

Example

PinCushion is a lightweight UIView extension in Swift 4 intended to clean up NSLayoutConstraint code. PinCushion attempts to use the same vocabulary that Interface Builder visually uses.

For example to add a width constraint to a view, all you need is view.pin(.width, constant:50.0) and your view is now constrained to a width of 50 points.

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

Requirements

Swift 4.2 iOS 8.0 and above

Installation

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

pod 'PinCushion'

Author

Lucas Best, lucas.best.5@gmail.com

License

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