title: Confused about the direction of iOS constraints
body: <p>I've been working through Matt Nueberg's Programming iOS 7 book and am struggling to understand something with the direction of constraints. On page 28 of the book, in the <code>multiplier, constant</code> section, the author states:</p>
  
  <blockquote>
    <p>The first attribute is set to the result.</p>
  </blockquote>
  
  <p>So the way I read this, is that when there is a two item constraint, item 1 is derived or dependent based on the value of item 2.</p>
  
  <p>So I have a view and a subview (button), I want to center the button horizontally. So I arrange my view and button and then control-drag from the button to the parent view:</p>
  
  <p><img src="https://i.stack.imgur.com/MPBDd.png" alt="enter image description here"></p>
  
  <p>and select <code>Center Horizontally</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/ElUeg.png" alt="enter image description here"></p>
  
  <p>Then if I select that constraint though, I see the following in the attributes inspector at the right:</p>
  
  <p><img src="https://i.stack.imgur.com/TIbXE.png" alt="enter image description here"></p>
  
  <p>This shows the superview as item 1, and the button as item 2. Does this mean, that it would try to adjust the center of the superview to match the center of the button? That wouldn't be what I want. Or am I misunderstanding the meaning of item 1 and item 2? Or does it mean that I did the control-drag backwards, that you're supposed to drag from the dependency to the dependent, rather than the dependent to the dependency as I did?</p>
  
  <p>I assume the order <em>does</em> matter, that is, which is item 1 and which is item 2. Because there's a menu option to swap the two. And if it were just a solver with no preference for what was adjusted, that wouldn't be necessary.</p>