mirror of https://github.com/SnapKit/SnapKit
Add an isActive API to Constraint
This commit is contained in:
parent
2313eb2818
commit
c206e9b944
|
@ -47,7 +47,16 @@ public final class Constraint {
|
|||
}
|
||||
}
|
||||
public var layoutConstraints: [LayoutConstraint]
|
||||
|
||||
|
||||
public var isActive: Bool {
|
||||
for layoutConstraint in self.layoutConstraints {
|
||||
if layoutConstraint.isActive {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MARK: Initialization
|
||||
|
||||
internal init(from: ConstraintItem,
|
||||
|
|
Loading…
Reference in New Issue