1

There is a thin gray border in the bottom of UINavigatioBar: enter image description here

I can't remove it!

I've tried:

self.navigationController?.navigationBar.layer.borderColor =
 UIColor.orangeColor().CGColor
self.navigationController?.navigationBar.layer.borderWidth = 0

With no chance.

Maysam
  • 7,246
  • 13
  • 68
  • 106

1 Answers1

1

It should work

 self.navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
 self.navigationController?.navigationBar.shadowImage = UIImage()

Add this line for background color (Change rgb value of your choice)

self.navigationController?.navigationBar.barTintColor = UIColor(rgba: "#000000")
Nakib
  • 4,593
  • 7
  • 23
  • 45