From 5ccc59f43d7a22de056c992a198b6822b12a621f Mon Sep 17 00:00:00 2001 From: "Noon, Christian" Date: Sun, 5 Oct 2014 17:32:41 -0700 Subject: [PATCH] Added a method for uninstalling constraints on a view. --- Snappy/View+Snappy.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Snappy/View+Snappy.swift b/Snappy/View+Snappy.swift index abb5a41..8bfc067 100644 --- a/Snappy/View+Snappy.swift +++ b/Snappy/View+Snappy.swift @@ -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() + } + } } \ No newline at end of file