Added a method for uninstalling constraints on a view.

This commit is contained in:
Noon, Christian 2014-10-05 17:32:41 -07:00
parent 0a40ba4d78
commit 5ccc59f43d
1 changed files with 6 additions and 0 deletions

View File

@ -53,4 +53,10 @@ public extension View {
public func snp_remakeConstraints(block: (maker: ConstraintMaker) -> ()) {
ConstraintMaker.remakeConstraints(self, block: block)
}
public func snp_uninstallConstraints() {
for existingLayoutConstraint in LayoutConstraint.layoutConstraintsInstalledOnView(self) {
existingLayoutConstraint.constraint?.uninstall()
}
}
}