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 want to change the white background to a clear color. How should I do it? Basically, I want the background color of the textField to be transparent .
source
share