title: How do I show a UISearchBar on the right side of a UINavigationItem?
body: <p>I am trying to display a UISearchBar in place of the button shown on the right side of the UINavigationItem. I am using this code:</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
      UISearchBar *searchBar = [[UISearchBar alloc] init];
      UIBarButtonItem *navRight = [[UIBarButtonItem alloc] initWithCustomView:searchBar];
      [[self navigationItem] setRightBarButtonItem:navRight];
  
      [searchBar release];
      [navRight release];
  }
  </code></pre>
  
  <p>However, the displayed search bar is only a few pixels wide. I need to make it wider.</p>
  
  <p>Am I going about this the wrong way? Is it at all possible?</p>