title: UISearchBar animation hiding button
body: <p>I currently have a UISearchBar (attached to a UISearchDisplayController), but I reduced the width of the search bar so I could display a custom button to its right when the search bar is not selected. The button is used to access other views.</p>
  
  <p>However, when I select the search bar and then press cancel (or even perform a search) and return to the normal view,  where the search bar should be displayed with my custom button, the search bar animates and takes up all the room for the button and the is not displayed. Essentially, the search bar takes up all the width of the screen when I only want it to take up a part of it.</p>
  
  <p>Is there any way to prevent the search bar from animating to the whole width of the screen?</p>
  
  <p>This is how I defined the CGRect of the search bar:</p>
  
  <pre><code>self = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 250.0f, 45.0f)]
  </code></pre>