瀏覽代碼

Now removing constraints from the view along with uninstalling them.

Noon, Christian 11 年之前
父節點
當前提交
a634c61942
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Snappy/View+Snappy.swift

+ 3 - 1
Snappy/View+Snappy.swift

@@ -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)
     }
 }