title: How to properly create a UIButton that resizes to the text length in Xcode 4?
body: <p>In Xcode 4 you should be able to design UI interfaces that do resize based on their content. Still it looks that the are some missing pieces regarding how to obtain this.</p>
  
  <p>I have a button that is configured in the XIB file to resize to the right and it has plenty of space to do that.</p>
  
  <p>The problem is that it doesn't seam to resize the button when the label is updated.</p>
  
  <p>This can be fixed by adding a <code>[button sizeToFit];</code> after the label is changed. </p>
  
  <p>Still I am looking for a solution that works without adding this manual step into the code.</p>
  
  <p><img src="https://i.stack.imgur.com/P3Wkm.png" alt="button-ios-43"></p>
  
  <p><img src="https://i.stack.imgur.com/y3no4.png" alt="button-ios-50b7"></p>
  
  <p>I mention that there is enough space to expand the button further, still <code>sizeToFit</code> seams to to enlarge the button but still not enough to fit the entire text.</p>
  
  <p>What am I missing?</p>