4

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

DixieFlatline
  • 7,895
  • 24
  • 95
  • 147

2 Answers2

10

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.

akashivskyy
  • 44,342
  • 16
  • 106
  • 116
0

in iOS6,you can hide it by set a clearColor Image to UINavigationBar's shadowImage.

check it here Remove the dark Line at the bottom of Navigationbar/Searchbar

Community
  • 1
  • 1
Nick
  • 241
  • 1
  • 2
  • 9