title: Swift: adding a button programmatically without supplying a frame during initialization
body: <p>Suppose I want to add a <code>UIBUtton</code> programmatically. Every <code>UIView</code> constructor requires a <code>CGFrame</code>, but in my case I want the size to be intrinsic and the location to be anchored to the super view's center.</p>
  
  <ul>
  <li>If I instantiate the <code>UIBUtton</code> element without supplying a frame, I see it in the debug view hierarchy but not on the screen.</li>
  <li>If I supply a frame, I basically guess the size and the <code>x,y</code> values brake the constraint I later add.</li>
  </ul>
  
  <p>What is the proper way to add a button programmatically?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: There's no problem instantiating without a <code>CGFrame</code>. I didn't see the button because I didn't add </p>
  
  <pre><code>button.translatesAutoresizingMaskIntoConstraints = false
  </code></pre>
  
  <p>which is done automatically by the interface builder.</p>