PseudoConstraints is an easy and simple interface to set NSLayoutConstraints
programatically. PseudoConstraints uses native UIKit
APIs at its core, so making it more efficient.
PseudoConstrains is available through Cocoapods and Carthage.
To install PseudoConstraints through CocoaPods add following to your podfile:
pod 'PseudoConstraints'
And run:
pod install
To install PseudoConstraints through CocoaPods add following to your cartfile:
github "pseudozain/PseudoConstraints"
And run:
carthge update --plateform iOS
PseudoConstraints is easy to use and you can set constraints of your views as easily as following:
headingLabel
.alignEdgeWithSuperviewSafeArea(.top, constant: 45)
.alignEdgesWithSuperview([.left, .right], constant: 25)
detailsLabel
.below(headingLabel, constant: 15)
.centerHorizontallyInSuperview()
.alignEdgeWithSuperviewSafeArea(.left, constant: 25)
Zain ul Abe Din
PseudoConstraints is available under the MIT license. See the LICENSE file for more info.