title: ios auto-layout: Programmatically set width constraint
body: <p>I am working on an ios application. I am adding the auto-layout programmatically to 2 labels.</p>
  
  <p>I need to add a constraint to make them equal width.</p>
  
  <p>I know how to fix the width of a label by using :</p>
  
  <pre><code>constraint = [NSLayoutConstraint
      constraintWithItem:myLabel
               attribute:NSLayoutAttributeWidth
              relatedBy:NSLayoutRelationEqual
                toItem: nil
             attribute:NSLayoutAttributeNotAnAttribute
            multiplier:1.0f
              constant:200.0f];
  </code></pre>
  
  <p>That would fix the label size to a constant. But I have 2 labels and I want them to have equal size without having to set a constant.</p>