                     }
                 }
             } else {
-                singleton.settedConstraints.remove(constraint)
+                singleton.storedConstraints.remove(constraint)
             }
         }
     }

    
    func setSettedConstraint(constraint:Constraint) {
        assert(!NSThread.isMainThread(), _fy_noMainQueueAssert)
        settedConstraints.forEach { con in
            if con.to == nil || con.from == nil {
                settedConstraints.remove(con)
            } else if con.to == constraint.to && con.direction == constraint.direction {
                settedConstraints.remove(con)
            }
        }
        settedConstraints.insert(constraint)
    }

    /// 按照程序逻辑，一个 view 最多同时只能在一个方向上拥有一个约束
    func removeDuplicateConstraintOf(view:UIView, at direction: Constraint.Direction) {
        assert(!NSThread.isMainThread(), _fy_noMainQueueAssert)
        constraints.forEach { con in
            if con.to == nil || con.from == nil {
                constraints.remove(con)
            } else if con.to == view && con.direction == direction {
                constraints.remove(con)
            }
        }
    }
    
    func noConstraintCirculationWith(constraint:Constraint) -> Bool {
        assert(!NSThread.isMainThread(), _fy_noMainQueueAssert)
        return constraints.filter {
            $0 <=> constraint
        }.count == 0
    }

        
        assert(NSThread.isMainThread(), _fy_MainQueueAssert)
        
        guard hasUnsetConstraints(unsetConstraints, of: views) else {
            views.forEach { view in
                view.layoutWithFangYuan()
            }
