PinCushion is a lightweight UIView extension 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.
PinCushion is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PinCushion'
Lucas Best, [email protected]
PinCushion is available under the MIT license. See the LICENSE file for more info.