0

My navigation bar is clear and I need to keep the bottom bar of the border white, I tried to use this code:

[self.navigationController.navigationBar.layer setBorderWidth:2.0];
[self.navigationController.navigationBar.layer setBorderColor:[[UIColor whiteColor] CGColor]];

But this makes the entire border white on all four edges white, how can I only change the bottom border?

I thought about adding an image at the very bottom to replicate the bar but I was hoping there was an easier way to do this.

Clip
  • 3,018
  • 8
  • 42
  • 77

1 Answers1

0

Give the navigation bar a background image that is mostly clear but whose bottom edge (2 pixels or whatever) is white. It's easy to construct this image in code so there's really no need to wish for "an easier way".

matt
  • 515,959
  • 87
  • 875
  • 1,141