소스 검색

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