title: How do I retrive the value of the constant of a constraint in Swift?
body: <p>I have a <code>NSLayoutConstraint</code> constraint that looks like this:</p>
  
  <pre><code>var myConstant:CGFloat = 20
  
  var myConstraint = NSLayoutConstraint (item: image,
          attribute: NSLayoutAttribute.Width,
          relatedBy: NSLayoutRelation.Equal,
          toItem: nil,
          attribute: NSLayoutAttribute.NotAnAttribute,
          multiplier: 1,
          constant: myConstant)
      self.view.addConstraint(myConstraint)
  </code></pre>
  
  <p>When an UIButton is pressed, the image gets resized, therefore the constant of the image changes.</p>
  
  <pre><code>self.image.transform = CGAffineTransformMakeScale(0.8, 0.8)
  </code></pre>
  
  <p>Though, when I print the value of the constant after the transformation finished, the constant stays the same as it was before:</p>
  
  <pre><code>println(constraintImageCharacterHomeLeading.constant) // 20
  </code></pre>
  
  <p>Why is that happening? I resized the image, hence the constraint must vary.</p>