0

i am trying to remove search bar border but not able to do , i have set search bar background color to clear still rounded border is come , i want search bar like this

but my search bar looks like this i was how i create search bar like this

thank you

Asmita
  • 477
  • 8
  • 20
  • You can create custom search bar using UITextField. – Parth Adroja May 12 '17 at 05:28
  • yes , i want only bottom border if i use this answer http://stackoverflow.com/questions/19899642/remove-border-of-uisearchbar-in-ios7 it wont work – Asmita May 12 '17 at 05:35
  • @Asmita what have you tried? give more details – ChenSmile May 12 '17 at 07:23
  • Customizing search bar takes some work instead you can use UITextField and customize it. It is the easy way – Praveen Kumar May 12 '17 at 08:03
  • Thanks Guys done with set searchbar.backgroundImage = UIImage() & added uiview in between searchbar & tableview , know its not correct way to do this but was not able to add only bottom border to searchbar – Asmita May 12 '17 at 08:30

1 Answers1

1

An easy solution is to choose a color that matches the background (white in this case)

Swift 4

UISearchBar.appearance().barTintColor = .white
Maruta
  • 1,063
  • 11
  • 24