0

I try to change the headerView's border color to surfing green, but it seems that my code does not work. What I tried is this:

tableView.tableHeaderView?.layer.borderColor = UIColor(red: 105.0/255.0, green: 215.0/255.0, blue: 189.0/255.0, alpha: 1.0).CGColor
tableView.tableHeaderView?.layer.masksToBounds = true

However, the header's border still looks like this:

Here is the Image (Sorry I do not have enough reputation to post images)

As you can see, the border is still black/deep blue.

Any help would be greatly appreciated! Thanks in advance!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Chenglu
  • 844
  • 1
  • 9
  • 17

1 Answers1

0

I think there is problem with border between navigation bar and search bar...

check on this link for solution

searchBar.backgroundImage = UIImage()

some example to change border:

searchBar.layer.borderWidth = 1 
searchBar.layer.borderColor = someColor.CGColor
Community
  • 1
  • 1
tbilopavlovic
  • 1,096
  • 7
  • 13