mirror of https://github.com/SnapKit/SnapKit
Moved removeConstraints method into the ConstraintMaker proxy.
This commit is contained in:
parent
a634c61942
commit
d0dc521429
|
@ -97,4 +97,11 @@ public class ConstraintMaker {
|
||||||
}
|
}
|
||||||
LayoutConstraint.setLayoutConstraints(layoutConstraints, installedOnView: view)
|
LayoutConstraint.setLayoutConstraints(layoutConstraints, installedOnView: view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal class func removeConstraints(view: View) {
|
||||||
|
for existingLayoutConstraint in LayoutConstraint.layoutConstraintsInstalledOnView(view) {
|
||||||
|
existingLayoutConstraint.constraint?.uninstall()
|
||||||
|
}
|
||||||
|
LayoutConstraint.setLayoutConstraints([], installedOnView: view)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -55,10 +55,6 @@ public extension View {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func snp_removeConstraints() {
|
public func snp_removeConstraints() {
|
||||||
for existingLayoutConstraint in LayoutConstraint.layoutConstraintsInstalledOnView(self) {
|
ConstraintMaker.removeConstraints(self)
|
||||||
existingLayoutConstraint.constraint?.uninstall()
|
|
||||||
}
|
|
||||||
|
|
||||||
LayoutConstraint.setLayoutConstraints([], installedOnView: self)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue