Add an isActive API to Constraint

This commit is contained in:
Robert Payne 2017-02-11 22:36:06 +13:00
parent 2313eb2818
commit c206e9b944
1 changed files with 10 additions and 1 deletions

View File

@ -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,