I have the following code for my UISearchBar:
UISearchBar * searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 300, 44)];
searchBar.placeholder = @"Search for a tag";
searchBar.delegate = self;
The result is as follows:
I'd like to change the white background to a clear color. How do I do this? Basically I want the textField background color to be clear.
If you are supporting iOS 5 and above just do:
[self.searchBar setBackgroundImage:[[UIImage alloc] init]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With