mirror of https://github.com/SnapKit/SnapKit
Added a method for uninstalling constraints on a view.
This commit is contained in:
parent
0a40ba4d78
commit
5ccc59f43d
|
@ -53,4 +53,10 @@ public extension View {
|
||||||
public func snp_remakeConstraints(block: (maker: ConstraintMaker) -> ()) {
|
public func snp_remakeConstraints(block: (maker: ConstraintMaker) -> ()) {
|
||||||
ConstraintMaker.remakeConstraints(self, block: block)
|
ConstraintMaker.remakeConstraints(self, block: block)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func snp_uninstallConstraints() {
|
||||||
|
for existingLayoutConstraint in LayoutConstraint.layoutConstraintsInstalledOnView(self) {
|
||||||
|
existingLayoutConstraint.constraint?.uninstall()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue