Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the border color below the navigation bar?

Can anyone advise me on how the border below the navigation bar can be changed?

enter image description here

I would like to change it from the current black light to a softer color. Appreciate any help here

like image 449
Zhen Avatar asked Jul 25 '11 10:07

Zhen


People also ask

How do I put a border on my navigation bar?

Add text-align:center to <li> or <a> to center the links. Add the border property to <ul> add a border around the navbar. If you also want borders inside the navbar, add a border-bottom to all <li> elements, except for the last one: Home.


1 Answers

I do not think there is a method to change the border color of the navigation color, other than the tintColor property of the UINavigationBar.

I would suggest that you create a UIView of that border size and place it below the navigation bar / add it as a subView.

UIView *navBorder = [[UIView alloc] initWithFrame:CGRectMake(0,navigationBar.frame.size.height-1,navigationBar.frame.size.width, 1)]; 

// Change the frame size to suit yours //

[navBorder setBackgroundColor:[UIColor colorWithWhite:200.0f/255.f alpha:0.8f]];
[navBorder setOpaque:YES];
[navigationBar addSubview:navBorder];
[navBorder release];
like image 156
Legolas Avatar answered Oct 08 '22 10:10

Legolas