Now removing constraints from the view along with uninstalling them.

This commit is contained in:
Noon, Christian 2014-12-30 15:08:10 -08:00
parent 5ccc59f43d
commit a634c61942
1 changed files with 3 additions and 1 deletions

View File

@ -54,9 +54,11 @@ public extension View {
ConstraintMaker.remakeConstraints(self, block: block)
}
public func snp_uninstallConstraints() {
public func snp_removeConstraints() {
for existingLayoutConstraint in LayoutConstraint.layoutConstraintsInstalledOnView(self) {
existingLayoutConstraint.constraint?.uninstall()
}
LayoutConstraint.setLayoutConstraints([], installedOnView: self)
}
}