title: AutoLayout: Vertically centering two UIViews in a superview that can resize
body: <p>I have two UIButtons, one on top of the other, in a superview whose height can be resized. The two buttons should have a constant vertical spacing between them, but the top and bottom spacing should resize so that the two buttons stay centered in the superview as it resizes.</p>
  
  <p>I tried creating two less-than-or-equal constraints (with equal priority) on the spacing to the superview for each button, as well as a constant vertical spacing between the buttons, as shown below:
  <img src="https://i.stack.imgur.com/HwgY5.png" alt="enter image description here"></p>
  
  <p>(The reason why it's less-than-or-equal here is because this view is defined at the given height in IB for 4" screens, but can be shrunk for 3.5" screens.) However, this doesn't do the trick, as you can see from the screenshot while the app is running:
  <img src="https://i.stack.imgur.com/WQ1m0.png" alt="enter image description here"></p>
  
  <p>It's almost as if you want to be able to tell AutoLayout that the two constraints themselves should have equal values, even if they are both set to "less-than-or-equal". Is there any way to do what I'm trying to do, or perhaps a better way?</p>