title: I am trying to set background image to UISearchBar but background image is not getting displaying in my iPhone application
body: <p>In my iPhone app I am trying to set background image to UISearch Bar, my image is not getting displayed. </p>
  
  <p>Here is my code</p>
  
  <pre><code>UISearchBar * tempSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake( 0, 0, self.view.bounds.size.width, 40 )];
  
  self.searchBar = tempSearchBar;
  tempSearchBar.delegate = self; 
  self.searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
  self.searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;
  self.searchBar.barStyle = UIBarStyleBlack;
  self.searchBar.backgroundColor=[UIColor clearColor];
  self.searchBar.backgroundImage=[UIImage imageNamed:@"Searchbox.png"];
  self.searchBar.placeholder = @"Search My Data";
  [self.searchBar sizeToFit];  
  
  [self.view addSubview:self.searchBar];
  [tempSearchBar release];
  </code></pre>