I\'m trying to remove the background of UISearchBar to make it transparent. I tried these solutions:
1.
for (UIView *subview in searchBar.subviews) { if
This should work:
[[searchBar.subviews objectAtIndex:0] removeFromSuperview]; [searchBar setBackgroundColor:[UIColor clearColor]];