title: TextField automatic resizing while typing in Swift using Auto-layout
body: <p>I need to set up a TextField that automatically changes its width while typing.
  I though it was a simple task, but its turning out to be pretty challenging.</p>
  
  <p>If I disable auto-layout, all I have to do to achieve this is to change the width of the TextField every time a new character is typed, using the following line:</p>
  
  <pre><code>TextField.frame.size.height = 30 + counter
  </code></pre>
  
  <p>(counter is related to the number of characters in the TextField).</p>
  
  <p>Using auto-layout, this procedure doesn't work anymore.
  Does anybody have a solution to this problem?
  I haven't found a proper answer anywhere!
  Thanks! </p>