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
For Swift, these 2 lines are enough:
self.search.isTranslucent = false self.search.backgroundImage = UIImage()
And then, apply required color that you want:
self.search.barTintColor = .red