I\'m trying to remove border of UISearchBar in iOS 7. In iOS 6 it\'s working fine. I created the UISearchBar programatically. I tried almost every thing from Stack Overflow
Neither only barTintColor
, backgroundImage
nor backgroundColor
alone were doing it for me, but doing them all together worked for me:
self.searchBar.translucent = NO;
self.searchBar.barTintColor = [styleManager currentSearchBarTintColor];
self.searchBar.backgroundImage = [UIImage new];
self.searchBar.backgroundColor = [styleManager currentSearchBarTintColor];