Further tweaks and improvements

This commit is contained in:
Robert Payne 2015-04-11 17:45:59 +12:00
parent 62c0318c00
commit ebe9bb1e8d
1 changed files with 2 additions and 7 deletions

View File

@ -89,11 +89,7 @@ final public class ConstraintMaker {
let maker = ConstraintMaker(view: view)
block(make: maker)
var layoutConstraints = [LayoutConstraint](view.snp_installedLayoutConstraints)
for existingLayoutConstraint in layoutConstraints {
existingLayoutConstraint.snp_constraint?.uninstallFromView()
}
self.removeConstraints(view)
for constraint in maker.constraints {
constraint.installOnView(updateExisting: false)
}
@ -114,8 +110,7 @@ final public class ConstraintMaker {
}
internal class func removeConstraints(view: View) {
let existingLayoutConstraints = [LayoutConstraint](view.snp_installedLayoutConstraints)
for existingLayoutConstraint in existingLayoutConstraints {
for existingLayoutConstraint in view.snp_installedLayoutConstraints {
existingLayoutConstraint.snp_constraint?.uninstallFromView()
}
}