title: UISearchBar: how can I stop it resizing when clicked?
body: <p>I have a <code>UISearchBar</code> (with <code>UISearchDisplayController</code>) as title view of <code>UINavigationBar</code>. There are also two buttons on either side of the searchbar within the navbar.</p>
  
  <p>When clicking on <code>UISearchBar</code>, it becomes wider and covers the button on the right of it.</p>
  
  <p>How can I stop it from becoming wider?</p>
  
  <p>Things tried but didn't work --></p>
  
  <ul>
  <li>The widened search bar then becomes the original size if the device is rotated.
  So, tried calling <code>[searchBar setNeedsLayout]</code> in -<code>searchBarTextDidBeginEditing</code></li>
  <li>All different <code>auto-resizing mask</code> options in <code>IB</code></li>
  </ul>
  
  <p>Edit: Didn't mention, but this is on iPhone (as we can put <code>searchbar</code> inside toolbar in iPad..)</p>