iPhoneアプリで背景画像をUISearchバーに設定しようとしていますが、画像が表示されません。
これが私のコードです
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];