From ebe9bb1e8decf5bebcb400980d5f0c46650bad7c Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Sat, 11 Apr 2015 17:45:59 +1200 Subject: [PATCH] Further tweaks and improvements --- Source/ConstraintMaker.swift | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/ConstraintMaker.swift b/Source/ConstraintMaker.swift index cfb9c21..ac08916 100644 --- a/Source/ConstraintMaker.swift +++ b/Source/ConstraintMaker.swift @@ -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() } }