Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove UINavigatonItem's border line

Is it possible to remove UINavigationItem's border? My view under black nav. bar is black and i don't want no visual border between them.

To make it clearer (image is not from my app):

enter image description here

like image 842
DixieFlatline Avatar asked Dec 27 '22 21:12

DixieFlatline


1 Answers

You can't hide it. You can add a subview that will mask it. Example:

UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 43, 320, 1)];
[overlayView setBackgroundColor:[UIColor whiteColor]];
[navBar addSubview:overlayView]; // navBar is your UINavigationBar instance
[overlayView release];

I didn't check it, but it should work.


EDIT: I checked it, it works.

like image 81
akashivskyy Avatar answered Jan 11 '23 20:01

akashivskyy