可以移除UINavigationItem的边框吗?黑色导航下的我的观点。条形图是黑色的,我不希望它们之间没有视觉边框。
为了让它更清晰(图片不是来自我的应用程序):

发布于 2011-05-05 02:46:23
你不能隐藏它。您可以添加一个子视图来遮罩它。示例:
UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 43, 320, 1)];
[overlayView setBackgroundColor:[UIColor whiteColor]];
[navBar addSubview:overlayView]; // navBar is your UINavigationBar instance
[overlayView release];我没有检查它,但它应该可以工作。
编辑:我检查过了,它工作正常。
发布于 2013-12-04 00:14:09
在iOS6中,您可以通过将clearColor图像设置为UINavigationBar的shadowImage来隐藏它。
请在此处查看Remove the dark Line at the bottom of Navigationbar/Searchbar
https://stackoverflow.com/questions/5888265
复制相似问题