How to remove UINavigatonItem's border line

偶尔善良 提交于 2019-12-04 10:44:48

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.

Nick

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!