This is my code:
let b = NSLayoutConstraint(item: some, attribute: fromAttribute, relatedBy: NSLayoutRelation.equal, toItem: some2, attribute: toAttribute, multiplier: multiplier, constant: -5)
b.isActive = true
self.layoutIfNeeded()
print(b.constant)
print(some.constraints.first(where: {$0.constant == -5 }))
And this is my print:
-5.0
nil
How can I get that constraint back in code? Why does it print out nil? I want to animate the constraint's constant later on. Thanks.