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