A Swift Autolayout DSL for iOS & OS X
A tagged release for Swift 2.3!
snp.label = ""
is now snp.setLabel("")
make.edges.equalTo(other.snp.edges)
#309setLabel()
#313SnapKit 3.0 is a complete re-write to take advantage of modern Swift 3.0 as well as clean up the API. As such please use with caution and check your apps thoroughly
install
and uninstall
have been deprecated, use activate
and deactivate
instead.snp.*
rather than .snp_*
. For example view.snp.makeConstraints { }
update(offset:)
, update(inset:)
and update(priority:)
.inset()
will no longer take CGPoint
or CGSize
as input.offset()
will no longer take CGPoint
, CGSize
, EdgeInsets
as inputupdateConstraints
will no longer allow creating new constraints unless there are no existing constraints for the view. If it does generate new constraints it will throw a fatal error.UIEdgeInsets
are now have their right and bottom value inverted for more natural results such as make.edges.equalTo(UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)).inset()
fatalError
with better outputNSLayoutConstraint.activate
and what view they are added to is now deferred to UIKitvar contentHugging<Axis>Priority: CGFloat
to make
var contentCompressionResistance<Axis>Priority: CGFloat
to make
UILayoutGuide
via make.left.equalTo(guide.snp.top)
make.edges.equalTo(other.snp.margins)